in reply to Multiple Capture Groups in RegEx
First, .* is almost always wrong. It is greedy, it does match nothing and anything.
Second, just do it. Get the second group, then break it up. You will have to deal with the elements anyways. It can be seen as a sport to process all with just one regex, but that's often error prone, unreadable, unmaintainable and slower.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Multiple Capture Groups in RegEx
by ketema (Scribe) on Apr 24, 2009 at 00:24 UTC | |
by shmem (Chancellor) on Apr 24, 2009 at 00:29 UTC | |
by ELISHEVA (Prior) on Apr 24, 2009 at 06:05 UTC |