[thelist] regex help

Joshua Olson joshua at waetech.com
Mon Sep 20 10:53:35 CDT 2004


> -----Original Message-----
> From: Theodore Serbinski
> Sent: Monday, September 20, 2004 11:41 AM
> 
> 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,

Modifying my previous suggestions slightly:

^([1]?[0-9]|2[0-4])?(\.[0-9])?$

That should do it.

<><><><><><><><><><>
Joshua Olson
Web Application Engineer
WAE Tech Inc.
http://www.waetech.com/service_areas/
706.210.0168 





More information about the thelist mailing list