my $str= "aaa aa aaa"; print "String = '$str'\n"; () = $str =~ /(?=aa)(?{print pos($str),"\n"})./g; __END__ String = 'aaa aa aaa' 0 1 4 7 8
--
flounder
In reply to Re: Elegant (i.e. declarative) way to find all possibly overlapping matches
by flounder99
in thread Elegant (i.e. declarative) way to find all possibly overlapping matches
by jsegal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |