[SR-Users] transformations {s.rm,match}

Daniel-Constantin Mierla miconda at gmail.com
Fri Dec 11 09:43:34 CET 2015


iirc, there is a transformation for regexp replacing, but not sure it
does again for all recurences or accepts the typical subst flags.

Other solutions:

 - avp_subst()
 - subst_user() (backup r-uri username in a var, set username to the
value you want to change, do the subst, then get the new value in your
variable and restore the r-uri username)


On 10/12/15 18:49, Jonathan Hunter wrote:
> Hi Guys,
> I have been using   {s.rm,match} to remove occurrences of numbers,
> however I am aware it removes all occurrences.
> Is it possible to make it only remove the first occurrence and not all? 
> For example If I am looking to modify 639157407639
> I want to remove only the first 63, not both.
> So I end up with 9157407639 and not 91574079.
> Is it possible with a transformation of is regex  the way ?
> thanks
> Jon
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20151211/978514b3/attachment.html>

More information about the sr-users mailing list