Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $str = "01:10 PM";
- $pattern = "/((1[0-2]|0?[1-9]):([0-5][0-9]) ?([AaPp][Mm]))/i";
- echo preg_match($pattern, $str);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement