numbers and strings and regex?



Hello

I have a series of files such as

blue-green-01-01.doc to
blue-green-01-09
blue-green-01-11 up to
blue-green-01-32

and am trying to evaluate the second set of 2 digits using File::Find
and this bit of code

if ($name =~ /.*?(\d{2})-((\d{1})(\d{1}))\.jmx/i) {

my $both = $2;
my $first = $3;
my $second = $4;

if ($4 <= 9)
{ $exnum = $4;
}
else {my $exnum = $both;
}

obviously something wrong here - where am I wrong?

Cheers

Geoff



.



Relevant Pages