numbers and strings and regex?
- From: Geoff Cox <geoff.cox@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 30 May 2005 16:31:56 GMT
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
.
- Follow-Ups:
- Re: numbers and strings and regex?
- From: Brian McCauley
- Re: numbers and strings and regex?
- From: Anno Siegel
- Re: numbers and strings and regex?
- Prev by Date: Re: Please explain following script for me. Thanks in advance.
- Next by Date: Re: numbers and strings and regex?
- Previous by thread: FAQ 8.41 How do I use an SQL database?
- Next by thread: Re: numbers and strings and regex?
- Index(es):
Relevant Pages
|