Regex for validating date in dd-Mmm-yyyy format
问题 I have an text input box which needs to be validated. The user should be only able to enter the date in dd-Mmm-yyyy format. ex: 01-Jun-2013, 31-Aug-2015 and so on. Or they should be able to enter T+1, T+2,...T+99. What kind of a regex pattern I could use to validate both of these. I think for validating the dd-Mmnm-yyyy, the following regex works: ^(([0-9])|([0-2][0-9])|([3][0-1]))\-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\-\d{4}$ Please help me with this! Update: I just need the