[Freeswitch-dev] Lua session:playAndGetDigits regex

Michael Collins msc at freeswitch.org
Fri Mar 27 11:02:19 PDT 2009


2009/3/27 Robert Clayton <rjcajax at gmail.com>:
> As I understand it everything entered in square brackets(a character class)
> is literal. In parentheses it is read as a metacharacter.

Character classes have their own rules. I don't recommend using them
unless you know precisely what you are doing. I like Brian's regex of
"(\*|\d{6})"

In brackets you have interesting things, like dashes not always being
dashes and a leading caret meaning negation.

[^A-Z]  <== what does this mean? ;)

In any case, check the regular expressions page on the wiki for more
online resources.
-MC



More information about the Freeswitch-dev mailing list