Skip to content

Instantly share code, notes, and snippets.

@thamas
Last active December 19, 2015 08:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thamas/5927499 to your computer and use it in GitHub Desktop.
Save thamas/5927499 to your computer and use it in GitHub Desktop.
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