Henry Fernandes
2014-07-11 22:18:27 UTC
I don't know how to apply the global flag in Kamailio. Can you give me an
example?
-H
From: Daniel-Constantin Mierla <miconda-***@public.gmane.org>
Reply-To: <miconda-***@public.gmane.org>, "Kamailio (SER) - Users Mailing List"
<sr-users-cR8azDVoa3IcDhw6gZKtMWD2FQJk+8+***@public.gmane.org>
Date: Thursday, 3 July, 2014 1:47 AM
To: "Kamailio (SER) - Users Mailing List" <sr-users-cR8azDVoa3IcDhw6gZKtMWD2FQJk+8+***@public.gmane.org>
Subject: Re: [SR-Users] how to remove non-digits using dp_translate
Hello,
you have to replace [^0-9] with empty, using the global flag.
Cheers,
Daniel
example?
-H
From: Daniel-Constantin Mierla <miconda-***@public.gmane.org>
Reply-To: <miconda-***@public.gmane.org>, "Kamailio (SER) - Users Mailing List"
<sr-users-cR8azDVoa3IcDhw6gZKtMWD2FQJk+8+***@public.gmane.org>
Date: Thursday, 3 July, 2014 1:47 AM
To: "Kamailio (SER) - Users Mailing List" <sr-users-cR8azDVoa3IcDhw6gZKtMWD2FQJk+8+***@public.gmane.org>
Subject: Re: [SR-Users] how to remove non-digits using dp_translate
Hello,
you have to replace [^0-9] with empty, using the global flag.
Cheers,
Daniel
I'd like to use the dialplan module to remove all non-digits from a string.
For example, "1-306-555-1234" becomes "13065551234" and "(306) 555-1234"
becomes "3065551234".
Unfortunately, I can't figure out the regular expressions for subst_exp and
repl_exp. I can easily replace one instance of a non-digit, however I can't
figure out how to replace all non-digits.
-H
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
nfo/sr-users
For example, "1-306-555-1234" becomes "13065551234" and "(306) 555-1234"
becomes "3065551234".
Unfortunately, I can't figure out the regular expressions for subst_exp and
repl_exp. I can easily replace one instance of a non-digit, however I can't
figure out how to replace all non-digits.
-H
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
nfo/sr-users
--
Daniel-Constantin Mierla -
http://www.asipto.comhttp://twitter.com/#!/miconda -
http://www.linkedin.com/in/miconda
_______________________________________________ SIP Express Router (SER) and
Kamailio (OpenSER) - sr-users mailing list sr-users-cR8azDVoa3IcDhw6gZKtMWD2FQJk+8+***@public.gmane.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Daniel-Constantin Mierla -
http://www.asipto.comhttp://twitter.com/#!/miconda -
http://www.linkedin.com/in/miconda
_______________________________________________ SIP Express Router (SER) and
Kamailio (OpenSER) - sr-users mailing list sr-users-cR8azDVoa3IcDhw6gZKtMWD2FQJk+8+***@public.gmane.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users