function clone (regex, additionalFlags) {
        if (!XRegExp.isRegExp(regex))
            throw TypeError("type RegExp expected");
        var x = regex._xregexp;
        regex = XRegExp(regex.source, getNativeFlags(regex) + (additionalFlags || ""));
        if (x) {
            regex._xregexp = {
                source: x.source,
                captureNames: x.captureNames ? x.captureNames.slice(0) : null
            };
        }
        return regex;
    }
// capture. Also allows adding new flags in the process of copying the regex
capture. Also allows adding new flags in the process of copying the regex
capture . Also allows adding new flags in the process of copying the regex
function clone (regex, additionalFlags) {
        if (!XRegExp.isRegExp(regex))
            throw TypeError("type RegExp expected");
        var x = regex._xregexp;
        regex = XRegExp(regex.source, getNativeFlags(regex) + (additionalFlags || ""));
        if (x) {
            regex._xregexp = {
                source: x.source,
                captureNames: x.captureNames ? x.captureNames.slice(0) : null
            };
        }
        return regex;
    }
function clone ( regex , additionalFlags ) { if ( ! XRegExp . isRegExp ( regex ) ) throw TypeError ( "type RegExp expected" ) ; var x = regex . _xregexp ; regex = XRegExp ( regex . source , getNativeFlags ( regex ) + ( additionalFlags || "" ) ) ; if ( x ) { regex . _xregexp = { source : x . source , captureNames : x . captureNames ? x . captureNames . slice ( 0 ) : null } ; } return regex ; }
capture.
capture .