in reply to Perl's regexp (?{...}) construct and constraining matches.
Use (?=) for success and (?!) for failure. That is easier to understand and more direct than \w\b\w. You end up with (?(?{ PERL-CODE }) (?=) | (?!) ). You can write only the failure condition by negating the result of the perl code: (? (?{ not PERL-CODE }) (?!) )
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl's regexp (?{...}) construct and constraining matches.
by davido (Cardinal) on Aug 14, 2004 at 15:51 UTC | |
by Aristotle (Chancellor) on Aug 14, 2004 at 19:26 UTC | |
by diotalevi (Canon) on Aug 16, 2004 at 12:25 UTC |