Michael,<br><br>I liked "(\*|\d{6})" also but when entered in:<br><br>agent_id = session:playAndGetDigits(1, 3, 2, 10000,'#', 'c:/DictationProject/audio/Validating.wav', '', "(\*|\d{6})"); <br>
<br>Creates the error:<br><br>2009-03-27 14:05:36 [ERR] switch_regex.c:184 switch_regex_match_partial() Regula<br>r Expression Error expression[(*|d{6})] error[nothing to repeat] location[1]<br><br>The escape characters seem to disappear and FS attempts to use the, /* an asterisk character, as * a metecharacter.<br>
<br>Bob<br><br><br><div class="gmail_quote">On Fri, Mar 27, 2009 at 2:02 PM, Michael Collins <span dir="ltr"><<a href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
2009/3/27 Robert Clayton <<a href="mailto:rjcajax@gmail.com">rjcajax@gmail.com</a>>:<br>
<div class="im">> As I understand it everything entered in square brackets(a character class)<br>
> is literal. In parentheses it is read as a metacharacter.<br>
<br>
</div>Character classes have their own rules. I don't recommend using them<br>
unless you know precisely what you are doing. I like Brian's regex of<br>
"(\*|\d{6})"<br>
<br>
In brackets you have interesting things, like dashes not always being<br>
dashes and a leading caret meaning negation.<br>
<br>
[^A-Z] <== what does this mean? ;)<br>
<br>
In any case, check the regular expressions page on the wiki for more<br>
online resources.<br>
<font color="#888888">-MC<br>
</font><div><div></div><div class="h5"><br>
_______________________________________________<br>
Freeswitch-dev mailing list<br>
<a href="mailto:Freeswitch-dev@lists.freeswitch.org">Freeswitch-dev@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</div></div></blockquote></div><br>