Re: Perl match problem



John Bokma wrote:
> "Jürgen Exner" <jurgenex@xxxxxxxxxxx> wrote:
>
>> (untested, just to give you an idea):
>>
>> if (/RD(\d*)/) and $1 >= -25 and $1 <= 25) ....
>
> Uhm, since you expect at least one digit, at most 2, and there could
> be a minus sign:
>
> /RD(-?\d\d?)/
>
> or
>
> /RD(-?\d{1,2})/

Thanks. I also forgot the enclosing square brackets for the number, BTW.

jue



.



Relevant Pages

  • Re: Perl match problem
    ... Uhm, since you expect at least one digit, at most 2, and there could be a ... minus sign: ... Prev by Date: ...
    (comp.lang.perl.misc)
  • Creating a unique ID number based on date and time
    ... account and the same date and this creates duplicates in the ID number. ... While this could work for my identifier, I would prefer just a 5 or 6 digit ... Prev by Date: ...
    (microsoft.public.excel.programming)
  • Re: Your first ever wish
    ... Out popped a djinn, and gave me a wish, which I spent uhm... ... I asked for "money". ... Prev by Date: ...
    (rec.games.roguelike.nethack)
  • Re: what happened to star trek???
    ... A single letter makes all the difference. ... Uhm, Slim Thug dropped. ... Matt ... Prev by Date: ...
    (rec.music.hip-hop)
  • Re: Files changed by an Update
    ... Search for the specific update by the 6 digit number on Microsoft's website. ... > Windows XP Tablet Edition with SP2 ... Prev by Date: ...
    (microsoft.public.windowsupdate)