in reply to
Re: \G and regexes
in thread
\G and regexes
I know that. The question is why.
Comment on
Re^2: \G and regexes
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.
[reply]
Re^4: \G and regexes
by
choroba
(Cardinal)
on Apr 05, 2010 at 22:53 UTC
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
*
.
[reply]
[d/l]
[select]
In Section
Seekers of Perl Wisdom