in reply to A tidier regex ?
What's the goal of the regex, validation, finding a match or extracting data from a line?
For extraction, the following should do:
/\b((?:CDC|DDCSMR|DDCRMR)\w*)/
For matching, it simplifies to
/\b(?:CDC|DDCSMR|DDCRMR)/
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: A tidier regex ?
by Anonymous Monk on Sep 14, 2010 at 14:18 UTC | |
by moritz (Cardinal) on Sep 14, 2010 at 14:43 UTC | |
by ikegami (Patriarch) on Sep 14, 2010 at 14:39 UTC | |
by Anonymous Monk on Sep 14, 2010 at 14:58 UTC | |
by ikegami (Patriarch) on Sep 14, 2010 at 17:21 UTC |