title: Check if NSString contains alphanumeric + underscore characters only
body: <p>I've got a string that needs to be only a-z, 0-9 and _</p>
  
  <p>How do I check if the input is valid? I've tried this but it accepts letter like å,ä,ö,ø etc.</p>
  
  <pre><code>NSString *string = [NSString stringWithString:nameField.text];
  NSCharacterSet *alphaSet = [NSCharacterSet alphanumericCharacterSet];
  [string stringByTrimmingCharactersInSet:alphaSet];
  [string stringByReplacingOccurrencesOfString:@"_" withString:@""];
  BOOL valid = [[string stringByTrimmingCharactersInSet:alphaSet] isEqualToString:@""];
  </code></pre>