python regex of a date in some text
Posted
by Horace Ho
on Stack Overflow
See other posts from Stack Overflow
or by Horace Ho
Published on 2010-05-05T01:26:48Z
Indexed on
2010/05/05
1:38 UTC
Read the original article
Hit count: 277
How can I find as many date patterns as possible from a text file by python? The date pattern is defined as:
dd mmm yyyy
^ ^
| |
+---+--- spaces
where:
- dd is a two digit number
- mmm is three-character English month name (e.g. Jan, Mar, Dec)
- yyyy is four digit year
- there are two spaces as separators
Thanks!
© Stack Overflow or respective owner