[OpenSIPS-Users] string modification

Bogdan-Andrei Iancu bogdan at opensips.org
Tue Oct 4 15:04:28 CEST 2016


Hi Denis,

Unfortunately the dialplan does not support empty string substitution :(

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 04.10.2016 15:19, Denis wrote:
> Re: [OpenSIPS-Users] string modification Hello!
>
> Bogdan, i am sorry for my importunity, but can you give me some 
> example with dialplan module?
>
> To speak the truth, not want to restart Opensips once again for using 
> transformation, but dialplan is already implemented in configuration 
> file and can me used for the task.
>
> Thank you.
>
>
> mailto:denis7979 at mail.ru
>
>
> 	Please, Bogdan, can you give me some example?
>
> Thank you.
>
> mailto:denis7979 at mail.ru
>
>
> 	YEs, sure it can.
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com
> On 30.09.2016 13:58, Denis wrote:
>
> 	Re: [OpenSIPS-Users] string modification Sorry, Bogdan
> But one more, dialplan can do it?
>
> mailto:denis7979 at mail.ru
>
>
> 	Yes, it is.
>
> Or you can do it shorter:
>  $rU = $(rU{re.subst,"/-//g"});
>
> Regards
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com
> On 30.09.2016 13:46, Denis wrote:
>
> 	Re: [OpenSIPS-Users] string modification Thank you, Bogdan
>
> Just in case, is this correctly?
>
> $var(input) = $rU;
> $var(output)=$(var(input){re.subst,"/-//g"});
> $rU=$var(output);
>
> mailto:denis7979 at mail.ru
>
>
> 	Hi,
>
> The easiest way is by using a regexp substitution (see 
> http://www.opensips.org/Documentation/Script-Tran-2-2#toc81) :
>
> $var(input)="123-45-67";
> $var(output) = $(var(input){re.subst,"/-//g"});
>
> Regards,
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com
> On 30.09.2016 13:00, Denis wrote:
>
> 	string modification Hello!
>
> I am sorry that it was early, but my question is, how can i delete 
> some character from some string if i do not know where this character 
> will be inside the string?
>
> For example, input string 123-45-67, or 12-345-67, but output string 
> should be 1234567.
>
> Thank you.
>
>
> mailto:denis7979 at mail.ru
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org <mailto:Users at lists.opensips.org>
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20161004/d6417904/attachment-0001.htm>


More information about the Users mailing list