[thelist] regex help

Theodore Serbinski tserbinski at washsq.com
Mon Sep 20 10:41:18 CDT 2004


DUCROCQ Yann FT/DSI/SICOR wrote:
> All tests are in this regExp :
> 
> /^(([01]?[0-9]|2[0-3])(\.[0-9])?|24\.0|24)?$/

Thanks all for the help! I was actually working on a very similar regex 
to Yanno's and have arrived at this final result:

/^(([01]?[0-9]|2[0-3])?(\.[0-9])?|24\.0|24)?$/

This one also tests for values such as .5 or .9. Any more thoughts on this?

ted


More information about the thelist mailing list