25 Oct
2010
25 Oct
'10
1:59 a.m.
mazilo wrote:
is it possible to combine the two regex expressions into a single expression using pipe within one dialplan? I tried expression="^\d{3}(0\d{4})\d{2}$|^(\d{3}[1-9]\d{6})$" and it only works for the 1st regex while the 2nd regex gives a null.
"^(?:\d{3}(0\d{4})\d{2}|(\d{3}[1-9]\d{6}))$" Note that if the first value is captured, it will be in $1. The second captured value will be in $2. This is described at http://wiki.freeswitch.org/wiki/Regular_Expression mose