PHP/regex: matching/replacing 24-hour times

Posted by confusedphpnoob on Stack Overflow See other posts from Stack Overflow or by confusedphpnoob
Published on 2010-05-21T15:05:58Z Indexed on 2010/05/21 15:10 UTC
Read the original article Hit count: 127

Filed under:
|

Hi,

How can I take a line like this:

Digital Presentation (10:45), (11:30), 12:00, 12:40, 13:20, 14:00, 14:40, 15:20, 16:00, 16:40, 17:20, 18:00, 18:40, 19:20, 20:00, 20:40, 21:20, 22:00, 22:40, 23:10, 23:40.

And match all the 24 hour times so I can convert to a more human readable format using date()?

Also I want to match times in the 24:00-24:59 range too

Thanks!

© Stack Overflow or respective owner

Related posts about php

Related posts about regex