function hasNamedCapture(regex) {
    return !!(regex[REGEX_DATA] && regex[REGEX_DATA].captureNames);
}
Determines whether a regex has extended instance data used to track capture names.

@private
@param {RegExp} regex Regex to check.
@returns {Boolean} Whether the regex uses named capture.