Fixed obscure bug due to regex being stored in variable.
Error occurred with non-date being incorrectly matched to the date
regex. Far from obvious what the cause was. However, fixed when
regexes stored only as strings rather than regexes when assigned
to variables.