[Users] regular expression

Edson 4lists at gmail.com
Wed Nov 29 15:14:12 CET 2006


Opppsss.... 

 

I think that You make a little typo....

 

Wouldn't the correct be "^sip:1[0-9]{8}@" to match all numbers with 9 digits
initiated by an '1' and followed by any combination of digits (from '0' to
'9')?

 

Edson

 

  _____  

From: users-bounces at openser.org [mailto:users-bounces at openser.org] On Behalf
Of raviprakash sunkara
Sent: quarta-feira, 29 de novembro de 2006 11:35
To: Jayesh Nambiar
Cc: Users at openser.org
Subject: Re: [Users] regular expression

 

 

On 11/29/06, Jayesh Nambiar <voip_freak at yahoo.co.in > 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]@*)


Use this 
if (uri=~"^sip:1{8}[0-9]@" ) 


 

 

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. 

Thanks in advance.

w/regards,
Jayesh

 


  _____  


Find out what India is talking about on - Yahoo! Answers India
<http://us.rd.yahoo.com/mail/in/yanswers/*http:/in.answers.yahoo.com/>  
Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get
it NOW
<http://us.rd.yahoo.com/mail/in/messengertagline/*http:/in.messenger.yahoo.c
om> 


_______________________________________________
Users mailing list
Users at openser.org
http://openser.org/cgi-bin/mailman/listinfo/users






-- 
Thanks and Regards
Ravi Prakash Sunkara 
ravi.sunkara at hyperion-tech.com 
M:+91 9985077535
O:+91 40 23114549
F:+91 40 40208727 
ravi.sunkara at hyperion-tech.com 
www.hyperion-tech.com  <http://www.hyperion-tech.com> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20061129/25df4eaf/attachment.htm>


More information about the sr-users mailing list