Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
sublime regexp add month name to date

Using Sublime Text's Replace function with regex

changes this:
"1997.01.01.";

to this:
"1997.01.03.";"Január";

Find What:

("([0-9]{4})[^0-9]*([0][1])[^0-9]*([0-9]{2})\.";)

Replace With:

\1"Január";

Looks for the dates where month is 01:

([0][1])

It was written for a CSV file that's the reason why we have quotation marks and semicolons in the string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment