Regular expression of different format of dates in python [duplicate]
问题 This question already has answers here : Check if string has date, any format (2 answers) Closed 3 years ago . I am trying to write a regular expression to catch different format of dates. The sentences are in a series and each sample of the series contains only one date, but may have other numbers. The format of dates is like this: 04/20/2009; 04/20/09; 4/20/09; 4/3/09 Mar-20-2009; Mar 20, 2009; March 20, 2009; Mar. 20, 2009; Mar 20 2009; 20 Mar 2009; 20 March 2009; 20 Mar. 2009; 20 March,