Symbol.matchAll
Symbol.matchAll
静态数据属性代表 众所周知的符号 Symbol.matchAll
。String.prototype.matchAll()
方法在返回迭代器的方法的第一个参数上查找此符号,该迭代器生成当前对象与字符串的匹配项。
¥The Symbol.matchAll
static data property represents the well-known symbol Symbol.matchAll
. The String.prototype.matchAll()
method looks up this symbol on its first argument for the method that returns an iterator, that yields matches of the current object against a string.
有关详细信息,请参阅 RegExp.prototype[Symbol.matchAll]()
和 String.prototype.matchAll()
。
¥For more information, see RegExp.prototype[Symbol.matchAll]()
and String.prototype.matchAll()
.
Try it
值
示例
使用 Symbol.matchAll
规范
Specification |
---|
ECMAScript Language Specification # sec-symbol.matchall |
浏览器兼容性
BCD tables only load in the browser