I have an array of words(all the words are in NSMutableArray). I need to filter the words as shown below.
???? – Any four letter word
ma?t* – Any word that starts with the letters “ma” and has a “t” as the forth letter.
z – Any word that contains the letter “z”
?n?t? – Any five letter word with ”n” as the second letter and “t” as the forth letter.
*s*b* – Any word that contains the letter “s” and then the letter “b” in the remaining letters.
mouth – The word “moth” will be returned if it exists in the current Word List
t*s? – Any words that start with the letter “t” , is at least three letters long and has “s” as the second last letter in the word.
* – Returns all words in the Word List.
you can use the below code for filter using pattern