Re: [SR-Users] Strip All but numbers/*/#

2013-02-20 Thread Timo Klecker
ag von Ali Jawad Gesendet: Dienstag, 12. Februar 2013 12:02 An: mico...@gmail.com; SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List Betreff: Re: [SR-Users] Strip All but numbers/*/# Thank you all that works just fine, my last step is to create an if statement to onl

Re: [SR-Users] Strip All but numbers/*/#

2013-02-12 Thread Ali Jawad
Thank you all that works just fine, my last step is to create an if statement to only enter to do this if the condition matches. if($rU=~"XYZ") //where xyz is anything not 0-9 * and # { $rU = $(rU{re.subst,/[^0-9*#]//g}); } Regards On Tue, Feb 12, 2013 at 10:42 AM, Daniel-Constantin Mierla <

Re: [SR-Users] Strip All but numbers/*/#

2013-02-12 Thread Daniel-Constantin Mierla
Hello, On 2/12/13 9:28 AM, Ali Jawad wrote: Hi Thanks, what I actually need is keep numbers and * and # and remove the rest, something like $rU = $(rU{re.subst,/![0-9*#]//g}); But I am not sure that ! works for negation. use [^0-9*#] for negation, see: - http://www.regular-

Re: [SR-Users] Strip All but numbers/*/#

2013-02-12 Thread Ali Jawad
Hi Thanks, what I actually need is keep numbers and * and # and remove the rest, something like $rU = $(rU{re.subst,/![0-9*#]//g}); But I am not sure that ! works for negation. Regards On Mon, Feb 11, 2013 at 5:43 PM, Daniel Tryba wrote: > On Monday 11 February 2013 11:24:36 A

Re: [SR-Users] Strip All but numbers/*/#

2013-02-11 Thread Daniel Tryba
On Monday 11 February 2013 11:24:36 Ali Jawad wrote: > I am using the below to strip "-" from destination numbers, it does work > just fine "I replace - with nothing", what i need to do now is to strip all > characters except 0-9 * and #. Is there anyway to do it using the following > configuration

[SR-Users] Strip All but numbers/*/#

2013-02-11 Thread Ali Jawad
Hi I am using the below to strip "-" from destination numbers, it does work just fine "I replace - with nothing", what i need to do now is to strip all characters except 0-9 * and #. Is there anyway to do it using the following configuration part if($rU =~ ".*-.*" ) { $rU = $(r