Hello!
With var everything fine, thank you.
mailto:[email protected]
Hello,
Try without quotes : $rU = $(rU{re.subst,/-//g});
Or use var to store your regex.
http://www.opensips.org/Documentation/Script-Tran-1-11#toc72
Regards,
On Thu, Oct 6, 2016 at 5:15 AM, Denis <[email protected]> wrote:
Hello, Bogdan!
In a log file i see
Oct 6 12:09:56 opensips-mirror /usr/local/opensips2.2/sbin/opensips[6990]:
ERROR:core:subst_parser: string too short
Oct 6 12:09:56 opensips-mirror /usr/local/opensips2.2/sbin/opensips[6990]:
ERROR:core:tr_eval_re: Can't compile regexp
Oct 6 12:09:56 opensips-mirror /usr/local/opensips2.2/sbin/opensips[6990]:
WARNING:core:do_assign: no value in right expression at
/usr/local/opensips2.2//etc/opensips/opensips.cfg:374
374 string
$rU = $(rU{re.subst,"/-//g"});
Thank you for any help.
mailto:[email protected]
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:[email protected]
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:[email protected]
_______________________________________________
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
--
Stas Kobzar
Developeur VoIP / VoIP Developer
ModulisĀ.ca Inc.
# Bureau / Office: 514-284-2020 x 246
Email: [email protected]
https://www.modulis.com_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users