         var namedMatches = [String: String]()
 
         if #available(iOS 11.0, OSX 10.13, *) {
-            let namedGroup = try! NSRegularExpression(pattern: "(\\(\\?<(\\w+)>.+?\\))")
-            namedGroup.matches(in: self.expression, range: NSMakeRange(0, self.expression.count)).forEach { (namedGroupMatch) in
-                let groupName = (self.expression as NSString).substring(with: namedGroupMatch.range(at: 2))
+            groupsNames.forEach { (groupName) in
                 let range = match.range(withName: groupName)
                 let value = (expression as NSString).substring(with: range)
                 debugDescription = (debugDescription as NSString).replacingCharacters(in: range, with: groupName.humanReadableString.lowercased())

        self.function = function
        self.file = file
        self.line = line
        
        // Just throw here; the test will fail :)
        self.regex = try! NSRegularExpression(pattern: expression, options: .caseInsensitive)
    }

    
    // Compute this as part of init
    let regex: NSRegularExpression
    let groupsNames: [String]
    
    /**
     Create a new Step definition with an expression to match against and a function to be
