Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

C#/ASP.NET REGEX VALIDATION

$
0
0

Hi,

I need help asap. hope someone can help me.

Im using this regex "^((0?[1-9]|1[012])(:[0-5]\d){0,2}(\ [AP][M]))$" to validate the time im entering the textbox.

it should accept format like: 12:00 AM, 1:00 PM, 9: AM but it is also accepting inputs like 12:00AM 1:00PM.

I mean it should not accept the input if it has no space before the AM or PM.

Thanks in advance.


Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>