confuse of regex command with "|"
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?
On Sat, Sep 26, 2009 at 8:45 PM, Seven Du <dujinfang@gmail.com> wrote:
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?
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
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
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>
Yep escape it.
/b
On Sep 28, 2009, at 10:47 AM, Michael Collins wrote:
regex "10"|"09\|10"
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (3)
-
Brian West
-
Michael Collins
-
Seven Du