[Kamailio-Users] PCRE / Regex Module
brandon at cryy.com
brandon at cryy.com
Fri Sep 18 02:48:35 CEST 2009
Inaki,
Ahah! thank you for this bit of information.
Sent from my Verizon Wireless BlackBerry
-----Original Message-----
From: Iñaki Baz Castillo <ibc at aliax.net>
Date: Fri, 18 Sep 2009 02:42:29
To: <users at lists.kamailio.org>
Subject: Re: [Kamailio-Users] PCRE / Regex Module
El Viernes, 18 de Septiembre de 2009, Brandon Armstead escribió:
> Hello,
> I do not know why it did not dawn upon me to simply use the =~
> operator. However it does appear to error out / not compile:
>
> "(?i)(restricted|anonymous|private|unknown|unavailable)", i.e.
>
> produces a runtime error:
>
> if($hdr(From) =~ "(?i)(restricted|anonymous|private|unknown|unavailable)"){
>
> }
Because =~ operator doesn't implement like (?i) sysntax. Use just:
"(restricted|anonymous|private|unknown|unavailable)"
Note that =~ uses case insensitive.
--
Iñaki Baz Castillo <ibc at aliax.net>
_______________________________________________
Kamailio (OpenSER) - Users mailing list
Users at lists.kamailio.org
http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
More information about the Users
mailing list