I am using following regex to validate date in format dd/mm/yyyy
in php:
preg_match("/([0-9]{2})\/([0-9]{2})\/([0-9]{4})/", $e_startdate, $matches)
But what will be the regex to validate time in the format 10:20 PM
or AM
. I want a regex which will validate following format for me.
<number><number><colon><number><number><space><AM or PM>
Thanks