[Kamailio-Users] PCRE / Regex Module
Iñaki Baz Castillo
ibc at aliax.net
Fri Sep 18 02:42:29 CEST 2009
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>
More information about the sr-users
mailing list