RegEx Pattern?

  • Thread starter Thread starter Luke Ward
  • Start date Start date
L

Luke Ward

I've never used the patterns before and wondered if anyone could tell me why
this does not work
[00-23]{2}:[00-58]{2}

I just want to validate 24 hour time entry.

Cheers

Luke
 
I believe this will work; I've tested it somewhat, and I'm sure you can
Google an equally good answer (or try PerlMonks or CPAN.org, that kind of
place).

\b(([0-1]?\d)|(2[0-3])):[0-5]\d\b
 
Back
Top