Micro Focus QTP (UFT) Forums
Regular Expression for time in 24 hour format with out colon - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Regular Expressions (https://www.learnqtp.com/forums/Forum-UFT-QTP-Regular-Expressions)
+--- Thread: Regular Expression for time in 24 hour format with out colon (/Thread-Regular-Expression-for-time-in-24-hour-format-with-out-colon)



Regular Expression for time in 24 hour format with out colon - Pallavi - 03-13-2012

Hi All,

Could you please let me know the regular expression for time in 24 hour format with out colon.

Example it shoud match: 1112 0r 2359

Thanks and Regards,
Pallavi


RE: Regular Expression for time in 24 hour format with out colon - sshukla12 - 03-13-2012

Hi,
Could you please check this, this might help u:
([01]?[0-9]|2[0-3])[0-5][0-9]

Regards,
Sankalp


RE: Regular Expression for time in 24 hour format with out colon - Pallavi - 03-13-2012

Thank you Sankalp!!

It worked for me.

Thanks and Regards,
Pallavi


RE: Regular Expression for time in 24 hour format with out colon - sshukla12 - 03-13-2012

Good to hear it worked 4 U.

Regards,
Sankalp