RegExp 命名捕获组
小于 1 分钟
RegExp
命名捕获组
类型
// patched for support `RegExp` named capture groups:
interface RegExp {
new (pattern: RegExp | string, flags?: string): RegExp;
exec(): RegExpExecResult | null;
[Symbol.replace](string: string, replaceValue: Function | string): string;
}
interface RegExpExecResult extends Array<string> {
groups?: {
[key: string]: string;
};
index: number;
input: string;
}
入口点
core-js/proposals/regexp-named-groups