     public func numberOfMatchesInString(pattern: String) ->Int {
         
         var _pattern = pattern
-        _pattern.replace("?", with: "\\?")
+        _pattern = _pattern.replace("?", with: "\\?")
         let regex = try! NSRegularExpression(pattern: _pattern,
                                              options: [.CaseInsensitive])
         

    public func firstMatchInString(pattern: String, options: NSRegularExpressionOptions = [.CaseInsensitive], matchingOptions: NSMatchingOptions = []) -> String? {
        
        var _pattern = pattern
        _pattern.replace("?", with: "\\?")
        let regex = try! NSRegularExpression(pattern: _pattern,
                                             options: options)
        let NSCopy = body as NSString

    public func matchesPattern(pattern: String, options: NSRegularExpressionOptions = [.CaseInsensitive], matchingOptions: NSMatchingOptions = []) -> Bool {
        
        var _pattern = pattern
        _pattern = _pattern.replace("?", with: "\\?")
        let regex = try! NSRegularExpression(pattern: _pattern,
                                             options: options)
        return regex.firstMatchInString(body, options: matchingOptions, range: NSMakeRange(0, body.length)) != nil
