Unexpected behavior by [NSRegularExpression stringByReplacingMatchesInString]
===

I was tinkering with Objective-C today, but I'm running into some odd behavior. Basically I was trying to replace all non-alphabetic lowercase characters from an NSString. What I had basically boiled down to:



    int main(int argc, const char * argv[])
    {

      @autoreleasepool {
        NSError *error;
        NSRegularExpression *pattern = [[NSRegularExpression alloc] initWithPattern:@"/[^abcdefghijklmnopqrstuvwxyz]/" options:0 error:&error];
        NSString *replacableStuff = @"a b c\nd e";
        NSLog(@"%@", [pattern stringByReplacingMatchesInString:replacableStuff options:0 range:NSMakeRange(0, [replacableStuff length]) withTemplate:@""]);
          
      }
        return 0;
    }

However, the replacement never seems to happen; running this logs "a b c\nd e" to the log thingie. (I was expecting to see "abcde".) I tried simpler patterns like `/[aeiou]/` or even just `/a/`, but no matter what I try, the stringByReplacingMatchesInString method doesn't seem to actually be replacing anything. What am I overlooking?