in reply to Re(3): Possessive Quantifiers
in thread Possessive Quantifiers
I'm guessing that (?>a*b*) is equivalent to Java's a*+b*+.
The equivalent to Java's a*+b*+ would be (?>a*)(?>b*). In this case that wouldn't make a difference of course, but it would in situations like this one:
$_ = "aaab"; print "/(?>[ab]+)(?>b+)/ matches $_\n" if /(?>[ab]+)(?>b+)/; print "/(?>[ab]+b+)/ matches $_\n" if /(?>[ab]+b+)/;
What about (?>a*(b|c)d*)? Can that be expressed in Java at all?
How about (a*(b|c)d*){1}+? (Yeah, it's ugly...)
— Arien
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re(4): Possessive Quantifiers
by Ferret (Scribe) on Aug 18, 2002 at 17:36 UTC |