by Stefan » Thu May 21, 2015 6:43 am
FROM:
20140721_193006.jpg
TO:
2014-07-21 19.30.06.jpg
RULE:
Separate date tokens with hyphens, time with dot, and also replace the underscore by a space.
So we match 4 digits, 2 digits, 2 digits, underscore, 2 digits, 2 digits, 2 digits.
and add the wanted delimiters our self in replacement string.
USE:
RegEx(1)
Match: (\d\d\d\d)(\d\d)(\d\d)_(\d\d)(\d\d)(\d\d)
or
Match: (\d{4})(\d{2})(\d{2})_(\d{2})(\d{2})(\d{2})
Replace: \1-\2-\3 \4.\5.\6
(Note the space between \3 and \4.)
Explanation:
\1 represent what was matched with first parentheses (...)
\2 represent what was matched with second parentheses (...)
The hyphens, space and the dots are entered literally by hand.