Use a look ahead assertion:
my $str = "PPPP"; my $search = "PP"; my $count = () = $str =~ /(?=$search)/g; print $count;
In reply to Re: frame shift in Perl string matching
by GrandFather
in thread frame shift in Perl string matching
by GTI
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |