<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
<div class="moz-cite-prefix">On 2/12/13 9:28 AM, Ali Jawad wrote:<br>
</div>
<blockquote
cite="mid:CAG2QdgYmrj1EvAV6cgQ5ta4hYGgBtPzkizmGMk0a6LoQuSAhGg@mail.gmail.com"
type="cite">
<div dir="ltr">Hi
<div>Thanks, what I actually need is keep numbers and * and #
and remove the rest, something like </div>
<div><br>
</div>
<div>
<div> $rU = $(rU{re.subst,/![0-9*#]//g});</div>
<div><br>
</div>
<div>
But I am not sure that ! works for negation.</div>
</div>
</div>
</blockquote>
use [^0-9*#] for negation, see:<br>
<br>
- <a class="moz-txt-link-freetext" href="http://www.regular-expressions.info/charclass.html">http://www.regular-expressions.info/charclass.html</a><br>
<br>
Cheers,<br>
Daniel<br>
<br>
<blockquote
cite="mid:CAG2QdgYmrj1EvAV6cgQ5ta4hYGgBtPzkizmGMk0a6LoQuSAhGg@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div><br>
Regards</div>
<br>
<div class="gmail_quote">On Mon, Feb 11, 2013 at 5:43 PM,
Daniel Tryba <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:daniel@pocos.nl" target="_blank">daniel@pocos.nl</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Monday 11 February 2013 11:24:36 Ali
Jawad wrote:<br>
> I am using the below to strip "-" from destination
numbers, it does work<br>
> just fine "I replace - with nothing", what i need
to do now is to strip all<br>
> characters except 0-9 * and #. Is there anyway to
do it using the following<br>
> configuration part<br>
<br>
</div>
You are using regular expression substitution, so yes this
can be done:<br>
/[^0-9*#]//g<br>
<br>
Take a look at <a moz-do-not-send="true"
href="http://en.wikipedia.org/wiki/Regular_expression"
target="_blank">http://en.wikipedia.org/wiki/Regular_expression</a><br>
for more info.<br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
<div dir="ltr">
<div>
<div><font><font color="#888888"><b><br>
</b></font></font></div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Kamailio World Conference, April 16-17, 2013, Berlin
- <a class="moz-txt-link-freetext" href="http://conference.kamailio.com">http://conference.kamailio.com</a> -</pre>
</body>
</html>