[OpenSIPS-Users] re.subst usage

Barnaby Ritchley barnyritchley at hotmail.com
Wed Jul 29 13:27:17 EST 2020


Hi Liviu,

Thats perfect - didn’t even think of that! [0-9] instead of \d works great.

Thanks again!


> On 29 Jul 2020, at 14:14, Liviu Chircu <liviu at opensips.org> wrote:
> 
> I would guess that the PCRE library does not support the "\d" literal, which also seems to be confirmed by this site [1].  The "/\+?[0-9]{5}([1-9][0-9]+)/\1/g" regexp should remove your tech prefix as expected.
> 
> BR,
> 
> [1]: https://www.regular-expressions.info/shorthand.html <https://www.regular-expressions.info/shorthand.html>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20200729/2877a24f/attachment.html>


More information about the Users mailing list