in reply to how to split full digit number?
See below. I have added an extra pair of parantheses to make .9 optional...
use warnings; use strict; my $f = 'chap 89.9'; if($f=~m/chap.( |[a-z])*(\d+)(\.(\d+))?/i) { print " $2 $4\n"; }
|
---|
In Section
Seekers of Perl Wisdom