unicode
property indicates whether or not the "
u
" flag is used with a regular expression.
unicode
is a read-only property of an individual regular expression instance.
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
特性属性在
RegExp.prototype.unicode
|
|
|---|---|
| 可写 | no |
| 可枚举 | no |
| 可配置 | yes |
值
unicode
是
布尔
and
true
if the "
u
" flag was used; otherwise
false
. The "
u
" flag enables various Unicode-related features. With the "u" flag, any Unicode code point escapes will be interpreted as such, for example.
You cannot change this property directly. It is read-only.
unicode
property
var regex = new RegExp('\u{61}', 'u');
console.log(regex.unicode); // true
| 规范 |
|---|
|
ECMAScript (ECMA-262)
The definition of 'RegExp.prototype.unicode' in that specification. |
| Desktop | Mobile | Server | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
unicode
|
Chrome 50 |
Edge
12
|
Firefox 46 | IE No | Opera 37 | Safari 10 | WebView Android 50 | Chrome Android 50 | Firefox Android 46 | Opera Android 37 | Safari iOS 10 | Samsung Internet Android 5.0 | nodejs Yes |
完整支持
不支持
见实现注意事项。
RegExp.lastIndex
RegExp.prototype.global
RegExp.prototype.ignoreCase
RegExp.prototype.multiline
RegExp.prototype.source
RegExp.prototype.sticky
RegExp
RegExp.$1-$9
RegExp.input ($_)
RegExp.lastMatch ($&)
RegExp.lastParen ($+)
RegExp.leftContext ($`)
RegExp.prototype.dotAll
RegExp.prototype.flags
RegExp.prototype.global
RegExp.prototype.ignoreCase
RegExp.prototype.multiline
RegExp.prototype.source
RegExp.prototype.sticky
RegExp.prototype.unicode
RegExp.rightContext ($')
RegExpInstance.lastIndex
get RegExp[@@species]
Function
Object
Object.prototype.__defineGetter__()
Object.prototype.__defineSetter__()
Object.prototype.__lookupGetter__()
Object.prototype.__lookupSetter__()
Object.prototype.hasOwnProperty()
Object.prototype.isPrototypeOf()
Object.prototype.propertyIsEnumerable()
Object.prototype.toLocaleString()
Object.prototype.toSource()
Object.prototype.toString()
Object.prototype.valueOf()
Object.setPrototypeOf()