title: NSPredicate search LIKE
body: <p>i'm trying to filter a string array with this predicate:</p>
  
  <pre><code>[NSPredicate predicateWithFormat:@"SELF LIKE[c] '#*!%d'", aNumber]
  </code></pre>
  
  <p>Every string which is like #WILDCARD!ANY_NUMBER is valid.</p>
  
  <p>But it doesn't work :(
  Can you help me?</p>
  
  <p>EDIT:</p>
  
  <pre><code>NSString *pattern = [@"#*!" stringByAppendingFormat:@"%d", numberVariable];
  NSPredicate *pred = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", pattern];
  NSArray *filteredArray = [anArray filteredArrayUsingPredicate:pred];
  </code></pre>
  
  <p>The array anArray contains Strings like #0!-1 (numberVariable is -1) but the array filterdArray is empty. So the regex doesn't work.</p>
  
  <p>EDIT:</p>
  
  <p>My Solution:</p>
  
  <pre><code>NSString *pattern = [@"#.*!\\" stringByAppendingFormat:@"%d", numberVariable];
  NSPredicate *pred = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", pattern];
  NSArray *filteredArray = [anArray filteredArrayUsingPredicate:pred];
  </code></pre>