<html><head><title>Re: [OpenSIPS-Users] string modification</title>
</head>
<body>
<span style=" font-family:'Times New Roman'; font-size: 12pt;">Please, Bogdan, can you give me some example?<br>
<br>
Thank you.<br>
<br>
</span><a style=" font-family:'arial'; font-size: 10pt;" href="mailto:denis7979@mail.ru">mailto:denis7979@mail.ru</a><br>
<br>
<table bgcolor="#ffffff">
<tr>
<td width=2 bgcolor= #0000ff><br>
</td>
<td><span style=" font-family:'courier new'; font-size: 12pt;">YEs, sure it can.<br>
Bogdan-Andrei Iancu<br>
OpenSIPS Founder and Developer<br>
</span><a style=" font-family:'courier new'; font-size: 12pt;" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a><br>
<span style=" font-family:'times new roman'; font-size: 12pt;">On 30.09.2016 13:58, Denis wrote:<br>
</span><table>
<tr>
<td width=2 bgcolor= #3200ff><br>
</td>
<td><span style=" font-family:'times new roman'; font-size: 12pt;">Re: [OpenSIPS-Users] string modification Sorry, Bogdan<br>
But one more, dialplan can do it?<br>
<br>
</span><a style=" font-family:'arial'; font-size: 10pt;" href="mailto:denis7979@mail.ru">mailto:denis7979@mail.ru</a><br>
<br>
<table bgcolor="#ffffff">
<tr>
<td width=2 bgcolor= #0000ff><br>
</td>
<td><span style=" font-family:'courier new'; font-size: 12pt;">Yes, it is.<br>
<br>
Or you can do it shorter:<br>
$rU = $(rU{re.subst,"/-//g"});<br>
<br>
Regards<br>
Bogdan-Andrei Iancu<br>
OpenSIPS Founder and Developer<br>
</span><a style=" font-family:'courier new'; font-size: 12pt;" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a><br>
<span style=" font-family:'times new roman'; font-size: 12pt;">On 30.09.2016 13:46, Denis wrote:<br>
</span><table>
<tr>
<td width=2 bgcolor= #3200ff><br>
</td>
<td><span style=" font-family:'times new roman'; font-size: 12pt;">Re: [OpenSIPS-Users] string modification Thank you, Bogdan<br>
<br>
Just in case, is this correctly?<br>
<br>
$var(input) = $rU;<br>
$var(output)=$(var(input){re.subst,"/-//g"});<br>
$rU=$var(output);<br>
<br>
</span><a style=" font-family:'arial'; font-size: 10pt;" href="mailto:denis7979@mail.ru">mailto:denis7979@mail.ru</a><br>
<br>
<table bgcolor="#ffffff">
<tr>
<td width=2 bgcolor= #0000ff><br>
</td>
<td><span style=" font-family:'courier new'; font-size: 12pt;">Hi,<br>
<br>
The easiest way is by using a regexp substitution (see </span><a style=" font-family:'courier new'; font-size: 12pt;" href="http://www.opensips.org/Documentation/Script-Tran-2-2#toc81">http://www.opensips.org/Documentation/Script-Tran-2-2#toc81</a><span style=" font-family:'courier new'; font-size: 12pt;">) :<br>
<br>
$var(input)="123-45-67";<br>
$var(output) = $(var(input){re.subst,"/-//g"});<br>
<br>
Regards,<br>
Bogdan-Andrei Iancu<br>
OpenSIPS Founder and Developer<br>
</span><a style=" font-family:'courier new'; font-size: 12pt;" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a><br>
<span style=" font-family:'times new roman'; font-size: 12pt;">On 30.09.2016 13:00, Denis wrote:<br>
</span><table>
<tr>
<td width=2 bgcolor= #3200ff><br>
</td>
<td><span style=" font-family:'times new roman'; 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:'arial'; font-size: 10pt;" href="mailto:denis7979@mail.ru">mailto:denis7979@mail.ru</a> <br>
<br>
<span style=" font-family:'courier new'; font-size: 12pt;">_______________________________________________<br>
Users mailing list<br>
</span><a style=" font-family:'courier new'; font-size: 12pt;" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a style=" font-family:'courier new'; font-size: 12pt;" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body></html>