I believe positive lookbehind is supposed to return the "5" in the following but it returns "minutes" instead. Any help deeply appreciated!
my $body_text="there are 5 minutes left in the program"; if ($body_text=~m/\d{1,2}(?=\s(mins|minutes))/g) { print $1; }
In reply to Return value from positive look behind by bestresearch2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |