[LON-CAPA-users] regular expression
Gerd Kortemeyer
lon-capa-users@mail.lon-capa.org
Tue, 16 Aug 2005 10:21:46 -0400
Why not use formula response instead of string?
On Aug 16, 2005, at 8:48 AM, H. K. Ng wrote:
> Hi,
>
> Is there a way to construct the following regular expression? I
> want the students to enter number1/(number2 * x) where number1 and
> number2 are known integers. However, number2 can be 1, so that
> means they can enter as number1/x and also, number1/(x) or number1/
> (1*x). Question: For the last 2 answers, what I like to check is,
> if they type the left parenthesis '(' then they need to enter the
> right parenthesis ')'. I look in the Mastering Regular Expressions
> book but could not find any info on how to check for an character.
>
> Thanks,
> -hk
>
> _______________________________________________
> LON-CAPA-users mailing list
> LON-CAPA-users@mail.lon-capa.org
> http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
>