Regex for SimpleDateFormat string

Viewed 6115

I have dates mainly in the forms of yyyy-MM-dd and yyyy-MM-dd hh:mm:ss. I want to pattern match yyyy-MM-dd hh:mm:ss.

Is it trivial to write an regex for this purpose? I am new to regex so would appreciate any resource tat could get me up to speed?

2 Answers
Related