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

  • 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)
  • c-extension crashes unexpected
    ... i try to write an extension which calls an api. ... but i`ve already managed to make a mistake. ... python 2.4 dies with an errorwindow. ...
    (comp.lang.python)
  • Re: corrupted jpgs: can they be recovered?
    ... You might try Irfan Viewer. ... file by mistake and tried to re-open it unsuccessfully getting the ... changing the copy extension, etc. nothing seems to work and i have no ...
    (microsoft.public.windowsxp.perform_maintain)
  • Re: PDB Files from Delphi 5 anyone?
    ... Also PDB is the extension for debug assemblies under .NET, ... in any way in connection to D5, or is a mistake and must be D7??? ...
    (borland.public.delphi.non-technical)