Outputs:$_ = "dog 789 cat dog dog bird cat wonder dog frog cat"; my @finds = /(dog(?:(?!dog).)*?cat)/g; say Dumper \@finds;
[ "dog 789 cat", "dog bird cat", "dog frog cat" ]
In reply to Re: Rematching within a regular expression
by Anonymous Monk
in thread Rematching within a regular expression
by jeff987
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |