Created
February 1, 2017 12:23
-
-
Save RShergold/fa840ef7f9b227af9e04d5ca62fcff04 to your computer and use it in GitHub Desktop.
swap keys and values with sublime replace
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
text content: | |
'AF' => 'Afghanistan' | |
'AX' => 'Aland Islands' | |
'AL' => 'Albania' | |
'DZ' => 'Algeria' | |
... | |
(regex mode on) | |
find: ('\w\w') => ('.*') | |
replace: $2 => $1 | |
result: | |
'Afghanistan' => 'AF' | |
'Aland Islands' => 'AX' | |
'Albania' => 'AL' | |
'Algeria' => 'DZ' | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment