El Miércoles, 23 de Diciembre de 2009, Brandon Armstead escribió: > Hello, > > I'm attempting to use the following in Kamailio: > $(hdr(from){re.subst,/(.*?);(.*)/\1/}) --- however it does not match / > replace, with this from header sample: > > From: <sip:714364x...@xx.xx.xx.xx > ;pstn-params=808282808882;cpc=unknown>;tag=gK0b53f6d9 > > However if this is fully pcre compatible, then I am a bit lost as I've > checked the results in php, perl, and python produces: > > From: <sip:714364x...@xx.xx.xx.xx (expected result) > > However, Kamailio does not match / replace / etc using the following: > xlog("L_INFO", "Test From Header Regex: > $(hdr(from){re.subst,/(.*?);(.*)/\1/})");
You are right. However, could you try by replacing "(.*?)" with "([^;]*)" ? The result should be the same. I suspect that "*?" is not supported in Kamailio regular expressions. -- Iñaki Baz Castillo <i...@aliax.net> _______________________________________________ Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users