Re: numbers and strings and regex?
- From: Geoff Cox <geoff.cox@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 30 May 2005 16:56:19 GMT
On 30 May 2005 16:43:25 GMT, anno4000@xxxxxxxxxxxxxxxxxxxxxxx (Anno
Siegel) wrote:
>Geoff Cox <geoff.cox@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in comp.lang.perl.misc:
>Your pattern requests files that have an extension ".jmx". Your examples
>have an extension ".doc" or none. Also, \d{1} is the same as \d.
my mistake they should be the same, ie .jmx
I have changed to \d instead of \d{1} but still something wrong with
the code
if ($name =~ /.*?(\d{2})-((\d)(\d))\.jmx/i) {
my $both = $2;
my $first = $3;
my $second = $4;
if ($4 <= 9)
{ $exnum = $4;
}
else {my $exnum = $both;
}
the $exnum value for when the second pair of digits in 01-11 is
greater than 09 ...?
Geoff
>[snip]
>
>Anno
.
- Follow-Ups:
- Re: numbers and strings and regex?
- From: Anno Siegel
- Re: numbers and strings and regex?
- References:
- numbers and strings and regex?
- From: Geoff Cox
- Re: numbers and strings and regex?
- From: Anno Siegel
- numbers and strings and regex?
- Prev by Date: Re: How do I ask the user for a password?
- Next by Date: Re: a simple question
- Previous by thread: Re: numbers and strings and regex?
- Next by thread: Re: numbers and strings and regex?
- Index(es):
Relevant Pages
|
|