Re: numbers and strings and regex?



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

.



Relevant Pages

  • Re: this is why i said signing him to that huge contract wasnt smart...
    ... team's standpoint than giving him the extension they did. ... My basic premise is that I disagree that signing him to the extension was a mistake, since it limited the team's liability to him as long as they wanted to keep him. ... The only reason that it would have been a mistake from the team's standpoint would be if, based on his injury history, they wanted to let him go at the end of the season. ...
    (alt.sports.basketball.nba.la-lakers)
  • Mistake in H1B Extension app. Please Help!
    ... My employer just filed for my 8th year extension. ... mistake in the application. ... was given a new I-94 card. ... Then this June 2006 I went to Toronto Canada. ...
    (misc.immigration.usa)
  • Re: this is why i said signing him to that huge contract wasnt smart...
    ... team's standpoint than giving him the extension they did. ... My basic premise is that I disagree that signing him to the extension was a mistake, since it limited the team's liability to him as long as they wanted to keep him. ... The only reason that it would have been a mistake from the team's standpoint would be if, based on his injury history, they wanted to let him go at the end of the season. ...
    (alt.sports.basketball.nba.la-lakers)
  • Re: this is why i said signing him to that huge contract wasnt smart...
    ... Terraholm wrote: ... team's standpoint than giving him the extension they did. ... My basic premise is that I disagree that signing him to the extension was a mistake, since it limited the team's liability to him as long as they wanted to keep him. ... The only reason that it would have been a mistake from the team's standpoint would be if, based on his injury history, they wanted to let him go at the end of the season. ...
    (alt.sports.basketball.nba.la-lakers)