Hello,
On 4/12/10 6:14 PM, Juha Heinanen wrote:
i tried to embed a PV in regex transformation, but didn't get desired result. is it possible or must regex only contain strings.
it supports only strings. The subst expression is pre-compiled at startup.
Some development is required to extend for what you want.
Cheers, Daniel
here is an example, where the idea is to strip string "456" from the end of string "123456":
$var(test) = "123456"; $var(rest) = "456"; $var(test) = $(var(test){re.subst,/^(.*)$var(rest)$/\1/}); xlog("result is $var(test)\n");
unfortunately, the result is 0 rather than "123".
i also tried
$var(test) = $(var(test){re.subst,/^(.*)$var(rest)$/\1/});
and
$var(test) = $(var(test){re.subst,/^(.*)$(var(rest))$/\1/});
but still 0.
-- juha
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users