psappenfield
Programmer
Hello,
I am trying to get a regex to work for the following time format: 2:00PM-2:15PM
I am fairly new to regex, but I copied the time condition from a previous regex that does work correctly.
Help please...
![[banghead] [banghead] [banghead]](/data/assets/smilies/banghead.gif)
I am trying to get a regex to work for the following time format: 2:00PM-2:15PM
Code:
/^([1-9]|0[1-9]|1[012])[:]([0-5][0-9])([AM|PM])[-]([1-9]|0[1-9]|1[012])[:]([0-5][0-9])([AM|PM])+$/
I am fairly new to regex, but I copied the time condition from a previous regex that does work correctly.
Help please...
![[banghead] [banghead] [banghead]](/data/assets/smilies/banghead.gif)