That is magic, Liviu. Even in v1.6!
- Jeff On Tue, Nov 11, 2014 at 1:13 PM, Liviu Chircu <[email protected]> wrote: > On second thoughts, my regex is utterly broken if the vars contain SIP > headers. This one will work much better: > > avp_subst("$avp(str)", "/[\t ]+$//"); > > > On 11/11/2014 08:07 PM, Liviu Chircu wrote: > > Hello Jeff, > > You could do something like: > > ... > loadmodule "avpops.so" > ... > startup_route > { > $var(str) = "foofoo "; > $avp(str) = $var(str); > avp_subst("$avp(str)", "/([^ ]*) *$/\1/"); > xlog("Replacement for '$var(str)' is '$avp(str)'\n"); > } > > Best regards, > > Liviu Chircu > OpenSIPS Developerhttp://www.opensips-solutions.com > > On 11/11/2014 06:54 PM, Jeff Pyle wrote: > > Hello, > > How might one remove trailing white space from a script variable or avp > from within the OpenSIPS script? > > > > - Jeff > > > > _______________________________________________ > Users mailing > [email protected]http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > > _______________________________________________ > Users mailing > [email protected]http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > _______________________________________________ > Users mailing list > [email protected] > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > >
_______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
