Hi,
Thanks for your reply but it will not match only two digits as I have specified the range( [0-9] ). Actually my primary requirement is it should not match any alphabets or special characters with the numbers.
I want that only the number should be matched.

w/regards,
Jayesh

----- Original Message ----
From: Alexandr Dubovikov <shurik@start4.info>
To: Jayesh Nambiar <voip_freak@yahoo.co.in>
Cc: users@openser.org
Sent: Wednesday, 29 November, 2006 1:15:51 PM
Subject: Re: [Users] regular expression

On Wed, Nov 29, 2006 at 12:58:44PM +0530, Jayesh Nambiar wrote:
> Hi all,
> Can someone please help me in formulating a regular expression. I have an expression like this:
> if(uri=~"^sip:1[0-9]*@)
> This matches numbers like 15552221212, but also matches number like 15552221212#.
>
> when i make it as:
> if(uri=~"^sip:1[0-9]@*)
    
not really, in this regexp your number can have only 2 digits and first one
should ne "1".

> Again this matches any special characters after the number.
>
> I just wanted a regular expression that will match only numbers and no alphabets or special characters.
> Can someone please help me to formulate a regular expression for this.


if(uri=~"^sip:1[0-9]+@*)

>
> Thanks in advance.


--
Alexandr Dubovikov * baron@iRC RusNet * mailto:shurik@start4.info
    AD1-UANIC      *  ICQ: 122351182  *  http://www.start4.info



Find out what India is talking about on - Yahoo! Answers India
Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW