<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<tt>Hi Vishal,<br>
<br>
Check the re.subst transformation - it is a sed like substitution
:<br>
<a class="moz-txt-link-freetext" href="http://www.opensips.org/Documentation/Script-Tran-2-4#toc82">http://www.opensips.org/Documentation/Script-Tran-2-4#toc82</a><br>
<br>
Regards,<br>
</tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
OpenSIPS Bootcamp 2018
<a class="moz-txt-link-freetext" href="http://opensips.org/training/OpenSIPS_Bootcamp_2018/">http://opensips.org/training/OpenSIPS_Bootcamp_2018/</a>
</pre>
<div class="moz-cite-prefix">On 10/03/2018 09:10 PM, Vishal Pai
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CACOmXtAdQpUAgpuwdU0jNgVpBgzCvCYM+8Y0d+pP9Rmd_gB6Bw@mail.gmail.com">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div>Hello Everyone</div>
<div><br>
</div>
<div>Is it possible to do regex match in opensips
configuration file?</div>
<div><br>
</div>
<div>Let's say we have 12125789000 and we have regex
expression</div>
<div><br>
</div>
<div>^(\+1|1)?([2-9][0-9][0-9][2-9][0-9][0-9])([0-9]{4})$</div>
<div><br>
</div>
<div>then the result would be</div>
<div><br>
</div>
<div>Group #1: 1</div>
<div>
Group #2: 212578</div>
<div>
Group #3: 9000 <br>
</div>
<div><br>
</div>
<div>Need to take Group #2 value in $var(x).</div>
<div><br>
</div>
<div>Thanks<br>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>