From osas@voipembedded.com Sat Feb 11 18:36:45 2023 From: Ovidiu Sas To: sr-users@lists.kamailio.org Subject: [SR-Users] Re: Issues matching regex Date: Sat, 11 Feb 2023 13:36:18 -0500 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1699177889==" --===============1699177889== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This will do it: if ($rU=3D~"^(\+?1)?(8(00|44|55|66|77|88))[2-9][0-9][0-9][0-9][0-9][0-9][0-9]= $") { xlog("L_INFO", "Tollfree call: $rU"); } -ovidiu On Sat, Feb 11, 2023 at 12:37 PM Nathan Stratton wrot= e: > > I am having an issue matching toll-free. I tested my regex on regex101.com,= and it looks good, but it does not match my if statement. Am I doing somethi= ng wrong? > > if (method=3D=3D"INVITE") { > xlog("L_INFO", "Checking Routes $rU"); > if ($rU=3D~"^(\+?1)?(8(00|44|55|66|77|88)[2-9]\d{6})$") { > xlog("L_INFO", "Tollfree call"); > }; > }; > > Logs show "