use strict; use warnings; use v5.24; my $s = "dogcat 42 birdfish"; if ($s =~ /(?<=dog).*\d+(?=fish)/sgxi) { say "Ah! The meaning of life!\n\n"; }
In reply to Positive lookbehind and lookahead confusion by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |