Skip to content

Instantly share code, notes, and snippets.

@vahotm
Created January 20, 2016 09:55
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 vahotm/9c80315236480c471bd7 to your computer and use it in GitHub Desktop.
Save vahotm/9c80315236480c471bd7 to your computer and use it in GitHub Desktop.
Following regex matches cyrillic characters in localization keys for NSLocalizedString
// Following regex matches cyrillic characters in localization keys for NSLocalizedString
//---------------------------------------------------------------------------------------
NSLocalizedString\(@"([\w\s\d]*?)([а-яА-Я]+)([\w\s\d]*?)"
//----------------------------------
// Test cases
//----------------------------------
NSLocalizedString(@"Notification", nil)
NSLocalizedString(@"Notificatio n ъ s df
", nil)
NSLocalizedString(@"Nъ", nil)
NSLocalizedString(@"nъ", nil)
NSLocalizedString(@"ъ", nil)
NSLocalizedString(@"ъываыва", nil)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment