Re: Perl match problem
- From: "Jürgen Exner" <jurgenex@xxxxxxxxxxx>
- Date: Wed, 31 Aug 2005 09:06:05 GMT
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
.
- Follow-Ups:
- Re: Perl match problem
- From: yezi
- Re: Perl match problem
- References:
- Perl match problem
- From: yezi
- Re: Perl match problem
- From: Jürgen Exner
- Re: Perl match problem
- From: John Bokma
- Perl match problem
- Prev by Date: Re: how to add a space using a regex
- Next by Date: Re: how to add a space using a regex
- Previous by thread: Re: Perl match problem
- Next by thread: Re: Perl match problem
- Index(es):
Relevant Pages
|