The datefinder is cool for parsing the dates out of the text, but you can omit the library and just use regular expressions (if the dates are always in the shown format).
import re
result = re.sub('\s(\d*\s\w*\s\d*)\s', ' DATE ', input_string)
Regular expression breakdown:
\s matches a space
( start capturing the text
\d* match any digit as many times as possible
\s match exactly one space character
\w* match as many word characters as possible (actually also matches numbers)
\s again one space
\d* again as many digits as possible
) end capturing
\s match one space
UPDATE
The datefinder package can be used as follows to find all dates:
dates_regex = datefinder.DateFinder().DATE_REGEX
dates_regex.sub('DATE ', input_string)
Note that this solution still uses the package, but doesn't actually do what you expect it to. It finds number sequences and replaces them too.
I would strongly suggest you build your own regex to cover exactly your needs.
find_dates, but I suppose you're using regular expression there. If so, just usere.subinstead ofmatchand it'll work fine.