[OpenSIPS-Users] Regular expression matching problem
Diego Barberio
diego.barberio at redmondsoftware.com
Mon May 20 17:57:19 CEST 2013
Hi All,
I'm having a really stupid issue with opensips 1.8.1. I need to do
different logic if the request line user is a number of 4 digits that can
be preceded by any character. So I created this regular expression:
^(.)?\d{4}$
I've tested it on www.regular-expressions.info/javascriptexample.html and
works perfect, however on opensips it never matches.
I've made the following test script:
if($rU =~ '^(.)?\d{4}$') {
xlog("MATCHES $rU\n");
}else{
xlog("NOT MATCHES $rU\n");
}
And I always get "NOT MATCHES":
May 20 11:54:33 localhost /usr/local/sbin/opensips[22628]: NOT MATCHES
*5522
May 20 11:54:42 localhost /usr/local/sbin/opensips[22629]: NOT MATCHES 5522
What am I doing wrong?
Thanks
Diego
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20130520/dcb4023a/attachment.htm>
More information about the Users
mailing list