[thelist] RegExp: new weird problem
Joshua Olson
joshua at waetech.com
Fri Sep 12 10:05:23 CDT 2003
----- Original Message -----
From: "Tab Alleman" <Tab.Alleman at MetroGuide.com>
Sent: Friday, September 12, 2003 10:49 AM
> 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?
Tab,
Two options:
1. Ignore the match and use $2
2. Make it (?:ON|STARTING) so that the match doesn't return a substring.
Good luck,
<><><><><><><><><><>
Joshua Olson
Web Application Engineer
WAE Tech Inc.
http://www.waetech.com
706.210.0168
More information about the thelist
mailing list