| Newsgroups |
gmane.editors.sed.user |
| Message-ID |
<[email protected]> |
On 2014-08-15 14:35, [email protected] [sed-users] wrote:
> > foo(?:(?!xx).)*bar
>
> And my last thought was right. :-) :-) I don't understand it but
> this works, great!
It translates as
foo # the literal "foo"
(?: # a non-collecting group
(?!xx) # assert that "xx" doesn't match here
. # any single character
) # the end of the non-collecting group
* # that "any character where 'xx' doesn't match"
# zero or more times
bar # the literal "bar"
-tim