I think what you want to use here is: [NSRegularExpression escapedPatternForString:string]