[OpenSIPS-Users] regex match

Bogdan-Andrei Iancu bogdan at opensips.org
Wed Oct 3 16:12:50 EDT 2018


Hi Vishal,

Check the re.subst transformation - it is a sed like substitution :
     http://www.opensips.org/Documentation/Script-Tran-2-4#toc82

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
   http://opensips.org/training/OpenSIPS_Bootcamp_2018/

On 10/03/2018 09:10 PM, Vishal Pai wrote:
> Hello Everyone
>
> Is it possible to do regex match in opensips configuration file?
>
> Let's say we have 12125789000 and we have regex expression
>
> ^(\+1|1)?([2-9][0-9][0-9][2-9][0-9][0-9])([0-9]{4})$
>
> then the result would be
>
> Group #1: 1
> Group #2: 212578
> Group #3: 9000
>
> Need to take Group #2 value in $var(x).
>
> Thanks
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20181003/3509f89a/attachment.html>


More information about the Users mailing list