[SR-Users] Trailing newline with {re.subst,expression}
Daniel Tryba
d.tryba at pocos.nl
Tue Aug 11 11:44:00 CEST 2015
I'm unable to get rid of the \n in "multiline" content of a var.
xlog("var: $var(sdp)");
$var(sdp)=$(var(sdp){re.subst,/^a=rtcp:.*//});
xlog("var: $var(sdp)");
a=sendrecv#015#012a=rtcp:31543#015#012a=X-foo:bar
becomes:
a=sendrecv#015#012#012a=X-foo:bar
Using the s flag results in no substitution at all, /^a=rtcp:.*//s should
result in
a=sendrecv#015#012
according to
http://www.kamailio.org/wiki/cookbooks/4.3.x/transformations#resubst_expression
Is this a bug or a feature? If it is a feature, how to get rid of the newline
(without additional regexps substitutions).
More information about the sr-users
mailing list