Skip to content

Instantly share code, notes, and snippets.

@Lessica
Last active May 22, 2021 07:36
Show Gist options
  • Save Lessica/b4122267092dbd0a4f908681e296ccc6 to your computer and use it in GitHub Desktop.
Save Lessica/b4122267092dbd0a4f908681e296ccc6 to your computer and use it in GitHub Desktop.
Regular expressions to find inconsistencies in .strings

Find All Inconsistencies

(title|ibShadowedToolTip|headerToolTip|placeholderString|label|paletteLabel) = (")(.+?)\2((.|\n)+?)\2\3\2;\n
(")(.*?)\1 = \1\2\1;

Fill Base Localization

"(.*?)" = "";
"$1" = "$1";

XIB Based:

(title|ibShadowedToolTip|headerToolTip|placeholderString|label|paletteLabel) = (")(.+?)\2(.+?)\*\/\n(.+?)\2\2;\n
$1 = $2$3$2$4*/
$5$2$3$2;

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