SyntaxFix
Write A Post
Hire A Developer
Questions
You can try the following
^\d{1,2}([:.]?\d{1,2})?([ ]?[a|p]m)?$
It can detect the following patterns :
2300 23:00 4 am 4am 4pm 4 pm 04:30pm 04:30 pm 4:30pm 4:30 pm 04.30pm 04.30 pm 4.30pm 4.30 pm 23:59 0000 00:00