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 shoul
T followed by "+" and a number ranging from "1 to 99"
Try with: T\+?\d{0,2}
where:
T
literal "T";\+?
- zero or one plus sign "+" with escape backslash (or other escape character, depends on language) - without it it will be treated as metacharacter '+'; the additional '?' sing means, that character before that could appear, but it is not necessary\d{0,2}
- from zero to two digits;DEMO