[thelist] RegExp: new weird problem

Sam sam at sam-i-am.com
Fri Sep 12 10:37:13 CDT 2003


missed the start of this thread... What language are you using?
Perl supports the extended regexp syntax (?:ON|STARTING) which clusters 
but doesn't create the back-reference.

Sam

> Argh, I found that changing my pattern to:
> 
> ^PER NIGHT (ON|STARTING) [0-9]{1,2}\s?[A-Z]{3}[0-9]{0,4} FOR (\d{1,2})
> NIGHTS?$
> 
> Fixes the problem, but it means that I have to return "STARTING" or "ON"
> as a submatch, and I don't wanna.  Do I hafta, or is there another way?



More information about the thelist mailing list