title: "\P{Letter}" and NSRegularExpression
body: <p>I have an NSString I would like to test with an NSRegularExpression, but it doesn't act anything like I would expect and I don't know where to search for an answer anymore.</p>
  
  <p>So here is my code:</p>
  
  <pre><code>    BOOL companyNameContainsOnlyAuthorizedCharacters = YES;
  
      NSError *error = nil;
      NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"[\P{Letter}]" options:0 error:&amp;error];
      NSArray *matches = [[NSArray alloc] init];
      matches = [regex matchesInString:[model editorName] options:0 range:NSMakeRange(0,[[model editorName] length])];
  
      if ([matches count] &gt; 0) {
  
          companyNameContainsOnlyAuthorizedCharacters = NO;
  
      }
  </code></pre>
  
  <p>For what I know, [\P{Letter}] should match anything but letters. Nonetheless, instead of that, it just match the characters "\", "P", "{", "L", "e", "t", "r" and "}". I have also tried without the brackets [], but then it doesn't match anything at all.</p>
  
  <p>Any help would be greatly appreciate, thank you in advance.</p>
  
  <p>Edit:
  Also, xcode gives me a warning that \P is an unknown escape sequence...</p>