[OpenSIPS-Users] Match regular expression for '+'
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Thu Oct 30 09:09:33 CET 2008
Hi Jayesh,
no, it shouldn't, because the whole number (up to @) matches the [2-9]*
which does not accept 1, but you have 1 in your number.
Regards,
Bogdan
Jayesh Nambiar wrote:
> Hi Bogdan,
> Thanks for the reply.
> So the RE that i had written which is if(uri=~"^sip:\+[2-9]*@")
> should match +91981122334455 right?
> But it does not. Any suggestions?
>
> --- Jayesh
>
> On Wed, Oct 29, 2008 at 1:12 PM, Bogdan-Andrei Iancu
> <bogdan at voice-system.ro <mailto:bogdan at voice-system.ro>> wrote:
>
> Hi Jayesh,
>
> try:
> if ($ru=~"^sip:\+12127773456 at domain.com
> <mailto:12127773456 at domain.com>
> <mailto:sip%3A%2B12127773456 at domain.com
> <mailto:sip%253A%252B12127773456 at domain.com>>")
>
> + is a special chr in regexp and you need to escape it to use it.
>
> Regards,
> Bogdan
>
> Jayesh Nambiar wrote:
>
> Hello,
> Can someone please guide me to write a regular expression that
> matches URIs like sip:+12127773456 at domain.com
> <mailto:sip%3A%2B12127773456 at domain.com>
> <mailto:sip%3A%2B12127773456 at domain.com
> <mailto:sip%253A%252B12127773456 at domain.com>> in OpenSIPS.
>
> I want to match numbers starting from '+'.
>
> Any help would be highly appreciated.
>
> Thanks in advance.
>
> w/regards,
> Jayesh
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org <mailto:Users at lists.opensips.org>
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
>
More information about the Users
mailing list