Hi,
check this https://opensips.org/html/docs/modules/3.4.x/regex.html
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
https://www.opensips-solutions.com
https://www.siphub.com
On 05.01.2024 13:56, Faheem Muhammad wrote:
Hi Machel,
Appreciate the correction; it was a typo
Hi Machel,
Appreciate the correction; it was a typo when I posted the question.
However, as Callum mentioned earlier, the "IF" condition with the "=~"
operator doesn't fully support PCRE. It seems that any regular expression
with parentheses isn't matched using the "=~" operator.
Using
The reason why your second regular expression is not matching the pattern
is because of a typo in the syntax. You have used the ~= operator instead
of the =~ operator, which is the correct way to test if a string matches a
regular expression in PCRE.
Op di 2 jan 2024 om 12:28 schreef Faheem
Hi Faheem,
This is a simple case of regex support - I believe OpenSIPs uses Extended
Regular Expressions and not Perl Compatible Regular Expressions.
Swap out \d with the longer [0-9] format and your expression should match.
Happy new year,
Callum
On Tue, 2 Jan 2024 at 11:27, Faheem Muhammad
Hi everyone,
Firstly, I wish you all a Happy New Year with the best wishes for each
community member and the OpenSIPS project.
I have a question related to regular expressions matching in an IF
condition.
There are two identical regular expressions. One RE is matching and one RE
is not matching