MarkJ MarkJ - 1 year ago 47
Java Question

How to match this date format with a regex?

hi to all regex master out there, I know you have a work around with regards to my problem. hehe






with yyyy not accepting any other characters than digit

Answer Source

That's assuming that the month is a 3-letter version: eg, Jan, Feb, Mar.

Updated version to match the changes to the question:


As has been mentioned, this won't actually validate the date, it'll just validate that the string matches the format of: 1 or 2 numbers, a dash, 3 letters, a dash, 4 numbers.