title: Cocoa Touch UITableView Alphabetical '#' Match All Unmatched
body: <p>I have a UITableView containing names that I would like to group (and sort) by the first letter (similar to the Address Book application). I am currently able to match any section ('A'-'Z') using:</p>
  
  <pre><code>// Sections is an array of strings "{search}" and "A" to "Z" and "#".
  NSString *pattern = [self.sections objectAtIndex:section];
  NSPredicate *predicate = nil;
  
  // Ignore search pattern.
  if ([pattern isEqualToString:@"{search}"]) return nil;
  
  // Non-Alpha and Non-Diacritic-Alpha (?).
  if ([pattern isEqualToString:@"#"]);
  
  // Default case (use case and diacritic insensitivity).
  if (!predicate) predicate = [NSPredicate predicateWithFormat:@"name beginswith[cd] %@", pattern];
  
  // Return filtered results.
  return [self.friends filteredArrayUsingPredicate:predicate];
  </code></pre>
  
  <p>However, matching for the '#' eludes me. I tried constructing a REGEX match using:</p>
  
  <pre><code>[NSPredicate predicateWithFormat:@"name matches '[^a-zA-Z].*'"];
  </code></pre>
  
  <p>But this fails for diacritic-alpha (duplicate rows appear). Any ideas would be greatly appreciated! Thanks.</p>