I need to extract a date of birth from a given string. The format is always "ddMMMyy" (for example "22NOV83").
The problem is that there could be other chars before and after the dob. possible inputs are : "DOB: 22NOV83", "CUSTOMER A DOB: 22NOV", "22NOV83 BLA BLA"
I think that by using this Regex:
^\d{2}[a-zA-Z]{3}\d{2}$
I can check if a string mathces a date , But how to check if a part of a string mathces a date and than extract it ?
Any help would be appreciated.
Pravesh Singh
06-Mar-2014