Thank you! Posting the solution that worked (returns 5) for me.
my $body_text="there are 5 minutes left in the program"; if ($body_text=~m/(\d{1,2})(?=\smins|\sminutes)/g) { print "here: " . $1 . "\n"; }
In reply to Re^2: Return value from positive look behind
by bestresearch2
in thread Return value from positive look behind
by bestresearch2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |