I'm writing a javascript program and I need to find the best way to match string against the beginning of regex. My exact problem is to validate starting symbols of date in dd.mm.yyyy
format. For example, 31.1
and 31.12.201
would be valid but 31..
or 31.122
would not.
I do not need regex specifically - if there is an easier way to do this in javascript, fine.
EDIT. Note, that i'm looking for a match of uncomplete date which is not what's been asked here.