in reply to ZERO_LENGTH match
I think you are misinterpreting the intent of the documentation: when it refers to 'ZERO_LENGTH' in the equivalence it is talking about actual zero length (ie matching an empty string) rather than potential zero length, such as matching /c?/.
The implication is therefore that, for example:
is treated as equivalent to:/( (?: c? )* )/x
to break the loop./( (?: c* | ) )/x
Similarly for a more complex zero-length expression such as a lookahead:
is treated as equivalent to:/( (?: a | (?=c) ) )*/x
/( (?: a* | (?=c) ) )/x
Hope this helps,
Hugo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: ZERO_LENGTH match
by Anonymous Monk on Aug 01, 2005 at 17:01 UTC | |
by hv (Prior) on Aug 02, 2005 at 01:15 UTC | |
by Anonymous Monk on Aug 01, 2005 at 17:16 UTC | |
by fro (Novice) on Aug 02, 2005 at 08:09 UTC |