in reply to Find all strings containing "a" characters, that are not followed by "b" characters.
Try
with negative lookahead./a(?!b)/
And yes, your regexp looks rather OK, except I would drop a few \b anchors:
or combined:/a\b|a[^b]/
Will that do?/a(\b|[^b])/
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Find all strings containing "a" characters, that are not followed by "b" characters.
by Anonymous Monk on Dec 12, 2012 at 18:04 UTC |
In Section
Seekers of Perl Wisdom