Michael,

Simple Working Reference:
agent_id = session:playAndGetDigits(1, 6, 2, 10000,"#", "c:/DictationProject/audio/Validating.wav", "", "23");

Entering 45 returned nothing as expected, entering 23 returned 23 as expected.
-------------------------------------------------------------------------

Literal asterisk using parentheses:
agent_id = session:playAndGetDigits(1, 6, 2, 10000,"#", "c:/DictationProject/audio/Validating.wav", "", "(\*)");

Entering a single asterisk and waiting for timeout, and the timeout occurred as expected.
Error created:
2009-03-27 14:59:47 [ERR] switch_regex.c:184 switch_regex_match_partial() Regular Expression Error expression[(*)] error[nothing to repeat] location[1]

Entering a single asterisk and a terminating #, the asterisk created an immediate timeout as expected.
Error created:
2009-03-27 15:00:26 [ERR] switch_regex.c:184 switch_regex_match_partial() Regular Expression Error expression[(*)] error[nothing to repeat] location[1]
-------------------------------------------------------------------------

Literal asterisk without parentheses:
agent_id = session:playAndGetDigits(1, 3, 2, 10000,'#', 'c:/DictationProject/audio/Validating.wav', '', "\*");

Entering a single asterisk and waiting for timeout, and the timeout occurred as expected.
Error created:
2009-03-27 15:02:14 [ERR] switch_regex.c:184 switch_regex_match_partial() Regular Expression Error expression[*] error[nothing to repeat] location[0]

Entering a single asterisk and a terminating #, the asterisk created an immediate timeout as expected.
Error created:
2009-03-27 15:02:58 [ERR] switch_regex.c:184 switch_regex_match_partial() Regular Expression Error expression[*] error[nothing to repeat] location[0]
-------------------------------------------------------------------------

The error message correctly denoted the proper positions if the asterisk is being evaluated as a metacharacter, as well as looking for something to repeat.

Bob

On Fri, Mar 27, 2009 at 2:29 PM, Michael Collins <msc@freeswitch.org> wrote:
2009/3/27 Robert Clayton <rjcajax@gmail.com>:
> Michael,
>
> I liked "(\*|\d{6})" also but when entered in:
>
> agent_id = session:playAndGetDigits(1, 3, 2, 10000,'#',
> 'c:/DictationProject/audio/Validating.wav', '', "(\*|\d{6})");
>
> Creates the error:
>
> 2009-03-27 14:05:36 [ERR] switch_regex.c:184 switch_regex_match_partial()
> Regula
> r Expression Error expression[(*|d{6})] error[nothing to repeat] location[1]
>
> The escape characters seem to disappear and FS attempts to use the, /* an
> asterisk character, as * a metecharacter.

for kicks try it with only one or the other, that is, with only
(\d{6}) or with only (\*) and see if you get that error. I'm curious
where it's bombing out. I think that test will help us figure out what
is going on.