Search for
.*?(?:([0-9]{4}-[0-9]{2}-[0-9]{2})|$)
And replace with
" $1"
Don't put the quotes, just to show there is a space before the $1
. This will also put a space before the first match in a row.
This regex will match as less as possible .*?
before it finds either the Date or the end of the row (the $
). If a date is found it is stored in $1
because of the brackets around. So as replacement just put a space to separate the found dates and then the found date from $1
.