Lines Matching refs:regex
72 const colorRegExp = /\u001b\[\d\d?m/g; // eslint-disable-line no-control-regex
718 function SideEffectFreeRegExpPrototypeExec(regex, string) {
720 return FunctionPrototypeCall(RegExpFromAnotherRealm.prototype.exec, regex, string);
724 function getCrossRelmRegex(regex) {
725 const cached = crossRelmRegexes.get(regex);
729 if (RegExpPrototypeGetHasIndices(regex)) flagString += 'd';
730 if (RegExpPrototypeGetGlobal(regex)) flagString += 'g';
731 if (RegExpPrototypeGetIgnoreCase(regex)) flagString += 'i';
732 if (RegExpPrototypeGetMultiline(regex)) flagString += 'm';
733 if (RegExpPrototypeGetDotAll(regex)) flagString += 's';
734 if (RegExpPrototypeGetUnicode(regex)) flagString += 'u';
735 if (RegExpPrototypeGetSticky(regex)) flagString += 'y';
738 const crossRelmRegex = new RegExpFromAnotherRealm(RegExpPrototypeGetSource(regex), flagString);
739 crossRelmRegexes.set(regex, crossRelmRegex);
743 function SideEffectFreeRegExpPrototypeSymbolReplace(regex, string, replacement) {
744 return getCrossRelmRegex(regex)[SymbolReplace](string, replacement);
747 function SideEffectFreeRegExpPrototypeSymbolSplit(regex, string, limit = undefined) {
748 return getCrossRelmRegex(regex)[SymbolSplit](string, limit);