Oddly enough, that would find no matches if $regex began with \n. Sloppy coding. No need for that "." in there anyway.() = $string =~ /(?=$regex)(?{push @matches, pos})./g;
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to •Re: Re: •Re: positions of all regexp matches
by merlyn
in thread positions of all regexp matches
by glwtta
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |