As I understand it everything entered in square brackets(a character class) is literal. In parentheses it is read as a metacharacter. <br><br><div class="gmail_quote">On Fri, Mar 27, 2009 at 2:48 AM, Even André Fiskvik <span dir="ltr"><<a href="mailto:grevenx@me.com">grevenx@me.com</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;">Imho you always have to escape the asterisk character if that is what<br>
you want,<br>
so "[*]" is bad. You would want "[\*]".<br>
<br>
See <a href="http://www.regular-expressions.info/characters.html" target="_blank">http://www.regular-expressions.info/characters.html</a> for tips.<br>
<br>
<br>
Best regards,<br>
<font color="#888888"><br>
Even André<br>
</font><div><div></div><div class="h5"><br>
On 27. mars. 2009, at 05.05, Robert Clayton wrote:<br>
<br>
> All,<br>
><br>
> Ok I know it must be me but...<br>
><br>
> In the Lua regex portion of session:playAndGetDigits what regex<br>
> would I use to match either a numeric entry, or an asterisk. It<br>
> seems when I attempt to define an asterisk as a character rather<br>
> than a metacharacter the regex script is evaluated other than I<br>
> would assume.<br>
> The error code presents \* as a single * and [*] other than a<br>
> character, leading to the hint that there is no preceding character<br>
> to multiply.<br>
><br>
> I have at most 15 minutes of proficiency in regular expressions,<br>
> but, are not \* or [*] equivalent to an asterisk character, rather<br>
> than a metacharacter?<br>
><br>
> Also it seems that the playAndGetDigits evaluates when either the<br>
> maximum number of characters is entered or the terminator is<br>
> pressed. Is there any way to evaluate the regex on each input and<br>
> therefore dynamically return after an acceptable entry? As in the<br>
> previous example a numeric string and a single asterisk are,<br>
> usually, different lengths and if an asterisk was used for, say,<br>
> abort, entering an asterisk followed by a terminator would seem<br>
> incorrect.<br>
><br>
> Bob<br>
><br>
><br>
</div></div><div><div></div><div class="h5">> _______________________________________________<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>
<br>
<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>