Hello,

A co-worker of mine needs a PERL style regular expression that can match
the numbers 500-1800 NON-inclusive.  This is for a web application
(WebCT), and if you want to validate a field in the built-in quiz module,
you can only use a PCRE.  This feature is generally used to allow students
to type in answers that are case-insenstive, or allow for slight
misspellings, but in this case we're trying to bend the regular expression
support to do a little math for us.

Anyway, I came up with the following:
(^[5-9][0-9]{2}|^[1][0-7][0-9]{2})

This seems to be working for 500-1799, but apparently we're supposed to
rule out 500 as well.

Any ideas?

Thanks for your time,
Dave M.

_______________________________________________
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech

Reply via email to