in reply to Re: Regular Expressions
in thread Regular Expressions
You see, the * allows the group to match multiple times, and each time through, the capture group gets overwritten. So it can match everything up to "81" the first pass, then throw away that capture, capture "1" instead, and then the \1 matches, and the whole match succeeds.
Sounds like Java's regex engine just doesn't try hard enough.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Regular Expressions
by Anonymous Monk on May 17, 2005 at 21:38 UTC | |
by Roy Johnson (Monsignor) on May 17, 2005 at 21:50 UTC | |
by Anonymous Monk on May 18, 2005 at 06:01 UTC | |
by Roy Johnson (Monsignor) on May 18, 2005 at 11:06 UTC |