in reply to Re: \G and regexes
in thread \G and regexes

I know that. The question is why.

Replies are listed 'Best First'.
Re^3: \G and regexes
by choroba (Cardinal) on Apr 05, 2010 at 20:32 UTC
    Because the \w\w\w part will match ACA and TGA will match TGA. The regexp does not specify the matching cannot start anywhere in the string, and that's what /G does.
      I'm sorry, I haven't looked at the example again. The \w\w\w part does not match anything in the second case because of *.