The main difference is, that I match the pattern at the beginning of the string while you match it on the substr$regexp="a{2}"; $_="aaaa"; do { push @a, $1 if ( m/^($regexp)/ ) } while ( s/^.// ) ; print join ( "-", @a );
Thanks for the input.
In reply to Re: Re: multiple matches with regexp
by almaric
in thread multiple matches with regexp
by almaric
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |