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 }) (?!) )
In reply to Re: Perl's regexp (?{...}) construct and constraining matches.
by diotalevi
in thread Perl's regexp (?{...}) construct and constraining matches.
by davido
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |