On Thursday 17 June 2010 10:01:40 Jonas Kellens wrote:
> This also gives result "1" but is not correct :
>
> exten => 1234,n,Set(test2=${REGEX("[fot]" ${footest})})
> exten => 1234,n,verbose(test2 returned ${test2})
>
> [Jun 17 16:59:01] -- Executing [1...@from:7]
> Verbose("SIP/13-00000096", "test2 returned 1") in new stack
> [Jun 17 16:59:01] test2 returned 1
Actually, it is correct. Your regex specifies a match for any string
that contains "f" or "o" or "t", because the square brackets create
a character class. If you remove the square brackets, it will do what
you expect.
--
Tilghman Lesher
Digium, Inc. | Senior Software Developer
twitter: Corydon76 | IRC: Corydon76-dig (Freenode)
Check us out at: www.digium.com & www.asterisk.org
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users