<div dir="ltr"><div><div><div><div>Hi All,<br><br></div>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}$<br>
</div>I've tested it on <a href="http://www.regular-expressions.info/javascriptexample.html">www.regular-expressions.info/javascriptexample.html</a> and works perfect, however on opensips it never matches.<br><br></div>
I've made the following test script:<br><br><span style="font-family:courier new,monospace"><br> if($rU =~ '^(.)?\d{4}$') {<br> xlog("MATCHES $rU\n");<br> }else{<br> xlog("NOT MATCHES $rU\n");<br>
}</span><br><br></div>And I always get "NOT MATCHES":<br><span style="font-family:courier new,monospace"><br>May 20 11:54:33 localhost /usr/local/sbin/opensips[22628]: NOT MATCHES *5522 <br>May 20 11:54:42 localhost /usr/local/sbin/opensips[22629]: NOT MATCHES 5522 </span><br>
<div><div><br></div><div>What am I doing wrong?<br><br></div><div>Thanks<br></div><div>Diego<br></div><div><br></div></div></div>