Re: RegEx: text not inside

"Tim Chase [email protected] [sed-users]" <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.