[Freeswitch-dev] Lua session:playAndGetDigits regex

Brian West brian at freeswitch.org
Fri Mar 27 07:17:04 PDT 2009

What exactly do you want to match?  Can you give me examples?


On Mar 26, 2009, at 11:05 PM, Robert Clayton wrote:

> All,
> Ok I know it must be me but...
> In the Lua regex portion of session:playAndGetDigits what regex  
> would I use to match either a numeric entry, or an asterisk. It  
> seems when I attempt to define an asterisk as a character rather  
> than a metacharacter the regex script is evaluated other than I  
> would assume.
> The error code presents \* as a single * and [*] other than a  
> character, leading to the hint that there is no preceding character  
> to multiply.
> I have at most 15 minutes of proficiency in regular expressions,  
> but, are not \* or [*] equivalent to an asterisk character, rather  
> than a metacharacter?
> Also it seems that the playAndGetDigits evaluates when either the  
> maximum number of characters is entered or the terminator is  
> pressed. Is there any way to evaluate the regex on each input and  
> therefore dynamically return after an acceptable entry? As in the  
> previous example a numeric string and a single asterisk are,  
> usually, different lengths and if an asterisk was used for, say,  
> abort, entering an asterisk followed by a terminator would seem  
> incorrect.
> Bob

Brian West
brian at freeswitch.org

-- Meet us a ClueCon!  http://www.cluecon.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20090327/873fa60f/attachment-0001.html 

More information about the Freeswitch-dev mailing list