[Users] substring function

Daniel-Constantin Mierla daniel at voice-system.ro
Sun Jan 22 15:53:32 CET 2006


Hello,

there is no direct substring function, but you can do it with subst 
(perl-like substitution) function of avpops.

http://www.voice-system.ro/docs/avpops/ar01s06.html#avp_subst

in your case, a possible solution is:

avp_subst("s:gw/s:gw_new/g", "/([0-9]{4})([a-z]{3})([0-9]{4})/\2/");

Cheers,
Daniel


On 01/22/06 11:33, unplug wrote:
> Does openser provide any substring function to get a substring within
> a string?  For example, I have a string "1234abc5678" in avp s:gw, and
> I want to get "abc" from s:gw.
>
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
>
>   




More information about the Users mailing list