Hi, I wonder how feasible is the folowing:

I have a regular expresion like:

  REGEXP = "^((1|20)|(13|3|4)|(5|6))"

There are 3 matching groups:

 1)   (1|20)
 2)   (13|3|4)
 3)   (5|6)

I want to match the RURI user, let's suppose $rU = "138787686223". In
this case the above regexp matches groups 1 and 2, but since group 2
matching is longest ("13" is longest than "1") I want to get value 2.

In case $rU = "999999" I need to get "null", in case $rU =
"1000022323" I need to get "1".

AFAIK there is no way to do it with current regular expression utils
in Kamailio, but maybe I miss something. Thanks a lot.


-- 
Iñaki Baz Castillo
<i...@aliax.net>

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to