Microsoft
Software
Hardware
Network
Question : Regular expression to validate time
Hi,
I wanted to validate time by regular expression in hh:mm:ss format
for example 16:12:18 is valid time
The below reqular expression is not working good
^([0]\d|[1][0-2])\/([0-2]\
d|[3][0-1]
)\/([2][01
]|[1][6-9]
)\d{2}(\s(
[0]\d|[1][
0-2])(\:[0
-5]\d){1,2
})*\s*([aA
pP][mM]{0,
2})?$
Can you please help me in fixing the regular expression
User has to enter time in hh:mm:ss format only
Many Thanks
Answer : Regular expression to validate time
^(2[0-3]:[0-5]\d:[0-5]\d|[
0-1]\d:[0-
5]\d:[0-5]
\d$
Posted via EE Mobile
Random Solutions
Terminal Services lock down question
Forward meeting requests to another mailbox
Weirder than usual HP desktop problem – power supply - motherboard?
cgi procress page
The designer must create an instance of type 'Microsoft.VisualBasic.Com
patibility
.VB6.BaseC
ontrolArra
y' but it cannot because the type is declared as abstract.
Validation of viewstate MAC failed? How I fix it?
move a VB.Net exe file
Internal Server Error
Return a value if date field is equal to the present date.
how to export the SSL certificate from Microsoft exchange 2003 in the .p12 format for mobile phone HTC Desire