[Users] regular expression

Jayesh Nambiar voip_freak at yahoo.co.in
Wed Nov 29 11:15:43 CET 2006


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 at start4.info>
To: Jayesh Nambiar <voip_freak at yahoo.co.in>
Cc: users at 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 at iRC RusNet * mailto:shurik at start4.info
    AD1-UANIC      *  ICQ: 122351182  *  http://www.start4.info







		
__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kamailio.org/pipermail/users/attachments/20061129/01afe0ae/attachment.htm 


More information about the Users mailing list