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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top