Quantcast
Channel: UltraEdit, UltraCompare, UEStudio forums
Viewing all articles
Browse latest Browse all 297

Find/Replace/Regular Expressions • RegEx for dates

$
0
0
I am trying to write a regular expression to find dates with the format YYYY-MM-DD HH:MM:ss. I tried the following expression, but UE returns You have entered an invalid regular expression. I tried both Unix and Perl options with the same result. 

What am I missing?

Code:

qr/^(?:[1-9]\d{3}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\d|3[01])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d{0}[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)-02-29[[:space:]]([01]?\d|2[0-3]):([0-5]\d):([0-5]\d)$
Thank you!

statistics: Posted by rhpt17:05 - 1 day ago — Replies 3 — Views 230



Viewing all articles
Browse latest Browse all 297

Trending Articles