View previous topic :: View next topic |
Author |
Message |
dujinfang at gmail.com Guest
|
Posted: Sat Sep 26, 2009 10:55 pm Post subject: [Freeswitch-users] confuse of regex command with "|&quo |
|
|
Hi, is this a bug?
freeswitch@internal> regex "10"|"09|10"
false
freeswitch@internal> regex "10"|"10"
true
freeswitch@internal> regex "10"|"(09|10)"
false
freeswitch@internal> 2009-09-27 11:47:00.815355 [ERR] switch_regex.c:101 COMPILE ERROR: 4 [missing )]["(09]
the first one should be true? |
|
Back to top |
|
|
msc at freeswitch.org Guest
|
Posted: Mon Sep 28, 2009 11:25 am Post subject: [Freeswitch-users] confuse of regex command with "|&quo |
|
|
On Sat, Sep 26, 2009 at 8:45 PM, Seven Du <dujinfang@gmail.com (dujinfang@gmail.com)> wrote:
Try adding a backslash in front of the pipe so that the regex command does not view the pipe as a data delimiter:
freeswitch@internal> regex "10"|"09\|10"
true
Let us know if you get it working for your needs.
-MC |
|
Back to top |
|
|
brian at freeswitch.org Guest
|
|
Back to top |
|
|
dujinfang at gmail.com Guest
|
Posted: Mon Sep 28, 2009 8:35 pm Post subject: [Freeswitch-users] confuse of regex command with "|&quo |
|
|
Thanks. But I think it would be nicer if the regex looks the same as in dialplan. can we add a optional separator arg on this case?
regex <data>|<pattern> [seperator]
regex "10":"09|10" :
2009/9/29 Brian West <brian@freeswitch.org (brian@freeswitch.org)>
|
|
Back to top |
|
|
|