<div dir="ltr">Hello,<div><br></div>Try without quotes : $rU = $(rU{re.subst,/-//g});<br><br><div>Or use var to store your regex.<div><br><a href="http://www.opensips.org/Documentation/Script-Tran-1-11#toc72">http://www.opensips.org/Documentation/Script-Tran-1-11#toc72</a><div><br></div><div>Regards,</div><div><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 6, 2016 at 5:15 AM, Denis <span dir="ltr">&lt;<a href="mailto:denis7979@mail.ru" target="_blank">denis7979@mail.ru</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>
<span style="font-family:&#39;Times New Roman&#39;;font-size:12pt">Hello, Bogdan!<br>
<br>
In a log file i see<br>
Oct  6 12:09:56 opensips-mirror /usr/local/opensips2.2/sbin/<wbr>opensips[6990]: ERROR:core:subst_parser: string too short<br>
Oct  6 12:09:56 opensips-mirror /usr/local/opensips2.2/sbin/<wbr>opensips[6990]: ERROR:core:tr_eval_re: Can&#39;t compile regexp<br>
Oct  6 12:09:56 opensips-mirror /usr/local/opensips2.2/sbin/<wbr>opensips[6990]: WARNING:core:do_assign: no value in right expression at /usr/local/opensips2.2//etc/<wbr>opensips/opensips.cfg:374<br>
<br>
374 string <br>
<span style="font-family:&#39;courier new&#39;;font-size:9pt"><span class="">$rU = $(rU{re.subst,&quot;/-//g&quot;});<br>
<br>
</span><span style="font-family:&#39;Times New Roman&#39;;font-size:12pt">Thank you for any help.<br>
<br>
</span></span></span><a style="font-family:&#39;arial&#39;;font-size:10pt" href="mailto:denis7979@mail.ru" target="_blank">mailto:denis7979@mail.ru</a><br>
<br>
<table bgcolor="#ffffff">
<tbody><tr>
<td width="2" bgcolor="#0000ff"><br>
</td>
<td><span class=""><span style="font-family:&#39;courier new&#39;;font-size:12pt">Yes, it is.<br>
<br>
Or you can do it shorter:<br>
    $rU = $(rU{re.subst,&quot;/-//g&quot;});<br>
<br>
Regards<br>
Bogdan-Andrei Iancu<br>
OpenSIPS Founder and Developer<br>
</span><a style="font-family:&#39;courier new&#39;;font-size:12pt" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.<wbr>com</a><br>
<span style="font-family:&#39;times new roman&#39;;font-size:12pt">On 30.09.2016 13:46, Denis wrote:<br>
</span></span><table>
<tbody><tr>
<td width="2" bgcolor="#3200ff"><br>
</td>
<td><span style="font-family:&#39;times new roman&#39;;font-size:12pt">Re: [OpenSIPS-Users] string modification Thank you, Bogdan<span class=""><br>
<br>
Just in case, is this correctly?<br>
<br>
$var(input) = $rU;<br>
$var(output)=$(var(input){re.<wbr>subst,&quot;/-//g&quot;});<br>
$rU=$var(output);<br>
<br>
</span></span><span class=""><a style="font-family:&#39;arial&#39;;font-size:10pt" href="mailto:denis7979@mail.ru" target="_blank">mailto:denis7979@mail.ru</a><br>
<br>
<table bgcolor="#ffffff">
<tbody><tr>
<td width="2" bgcolor="#0000ff"><br>
</td>
<td><span style="font-family:&#39;courier new&#39;;font-size:12pt">Hi,<br>
<br>
The easiest way is by using a regexp substitution (see </span><a style="font-family:&#39;courier new&#39;;font-size:12pt" href="http://www.opensips.org/Documentation/Script-Tran-2-2#toc81" target="_blank">http://www.opensips.org/<wbr>Documentation/Script-Tran-2-2#<wbr>toc81</a><span style="font-family:&#39;courier new&#39;;font-size:12pt">) :<br>
   <br>
$var(input)=&quot;123-45-67&quot;;<br>
$var(output) = $(var(input){re.subst,&quot;/-//g&quot;}<wbr>);<br>
<br>
Regards,<br>
Bogdan-Andrei Iancu<br>
OpenSIPS Founder and Developer<br>
</span><a style="font-family:&#39;courier new&#39;;font-size:12pt" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.<wbr>com</a><br>
<span style="font-family:&#39;times new roman&#39;;font-size:12pt">On 30.09.2016 13:00, Denis wrote:<br>
</span><table>
<tbody><tr>
<td width="2" bgcolor="#3200ff"><br>
</td>
<td><span style="font-family:&#39;times new roman&#39;;font-size:12pt">string modification Hello!<br>
<br>
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?<br>
<br>
For example, input string 123-45-67, or 12-345-67, but output string should be 1234567.<br>
<br>
Thank you.<br>
<br>
<br>
</span><a style="font-family:&#39;arial&#39;;font-size:10pt" href="mailto:denis7979@mail.ru" target="_blank">mailto:denis7979@mail.ru</a> <br>
<br>
<span style="font-family:&#39;courier new&#39;;font-size:12pt">______________________________<wbr>_________________<br>
Users mailing list<br>
</span><a style="font-family:&#39;courier new&#39;;font-size:12pt" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a style="font-family:&#39;courier new&#39;;font-size:12pt" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</span></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</div><br>______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><span><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:15px;font-family:Arial;color:rgb(0,112,192);font-weight:bold;vertical-align:baseline;white-space:pre-wrap;background-color:transparent">Stas Kobzar</span></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:Arial;color:rgb(166,166,166);vertical-align:baseline;white-space:pre-wrap;background-color:transparent">Developeur VoIP / VoIP Developer</span></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><br></p></span><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-family:Arial;color:rgb(0,112,192);font-weight:bold;vertical-align:baseline;white-space:pre-wrap;background-color:transparent">Modulis­.ca Inc.</span></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:Arial;color:rgb(0,0,0);font-weight:bold;vertical-align:baseline;white-space:pre-wrap;background-color:transparent"># Bureau / Office: 514-284-2020 x 246</span></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11px;font-family:Arial;color:rgb(0,0,0);font-weight:bold;vertical-align:baseline;white-space:pre-wrap;background-color:transparent">Email</span><span style="font-size:11px;font-family:Arial;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transparent">: </span><span style="text-decoration:underline;font-size:11px;font-family:Arial;color:rgb(17,85,204);vertical-align:baseline;white-space:pre-wrap;background-color:transparent"><a href="http://firstname.lastname" style="text-decoration:none" target="_blank">s</a>tas.kobzar</span><a style="text-decoration:none"><span style="font-size:11px;font-family:Arial;color:rgb(17,85,204);text-decoration:underline;vertical-align:baseline;white-space:pre-wrap;background-color:transparent">@modulis.ca</span></a></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-family:Arial;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transparent"> </span></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="text-decoration:underline;font-size:11px;font-family:Arial;color:rgb(17,85,204);vertical-align:baseline;white-space:pre-wrap;background-color:transparent"><a href="https://www.modulis.com/" style="text-decoration:none" target="_blank">https://www.modulis.com</a></span></p></div></div></div></div></div></div></div></div></div>
</div>