Skip to content

Instantly share code, notes, and snippets.

@Lucien
Last active December 11, 2015 22:58
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 Lucien/4673458 to your computer and use it in GitHub Desktop.
Save Lucien/4673458 to your computer and use it in GitHub Desktop.
Filter NSArray with strings matching: a*or
NSArray *aporWords = @[@"apor", @"amor", @"calor", @"aviador"];
NSArray *filteredArray = [aporWords filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"SELF MATCHES %@", @"\\b[a][a-z][o][r]\\b]"]];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment