From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../global_objects/regexp/unicode/index.html | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 files/ja/web/javascript/reference/global_objects/regexp/unicode/index.html (limited to 'files/ja/web/javascript/reference/global_objects/regexp/unicode') diff --git a/files/ja/web/javascript/reference/global_objects/regexp/unicode/index.html b/files/ja/web/javascript/reference/global_objects/regexp/unicode/index.html new file mode 100644 index 0000000000..ea2848a563 --- /dev/null +++ b/files/ja/web/javascript/reference/global_objects/regexp/unicode/index.html @@ -0,0 +1,71 @@ +--- +title: RegExp.prototype.unicode +slug: Web/JavaScript/Reference/Global_Objects/RegExp/unicode +tags: + - ECMAScript 2015 + - JavaScript + - Property + - Prototype + - Reference + - RegExp + - Regular Expressions +translation_of: Web/JavaScript/Reference/Global_Objects/RegExp/unicode +--- +
{{JSRef}}
+ +

unicode プロパティは、 "u" フラグが正規表現で使われているかどうかを示します。unicode は正規表現インスタンスごとの読み取り専用プロパティです。

+ +
{{EmbedInteractiveExample("pages/js/regexp-prototype-unicode.html", "taller")}}
+ + + +
{{js_property_attributes(0, 0, 1)}}
+ +

解説

+ +

unicode の値は {{jsxref("Boolean")}} です。"u" が使われていたら、true です。さもなければ、false です。"u" フラグは様々な Unicode 関連の機能を有効にします。"u" フラグで、どんな Unicode コードポイントエスケープでもそのようなものとして解釈されます。

+ +

このプロパティを直接変更することはできません。読み取り専用です。

+ +

+ +

unicode プロパティの使用

+ +
var regex = new RegExp('\u{61}', 'u');
+
+console.log(regex.unicode); // true
+
+ +

仕様書

+ + + + + + + + + + + + +
仕様書
{{SpecName('ESDraft', '#sec-get-regexp.prototype.unicode', 'RegExp.prototype.unicode')}}
+ +

ブラウザーの互換性

+ +
+ + +

{{Compat("javascript.builtins.RegExp.unicode")}}

+
+ +

関連情報

+ + -- cgit v1.2.3-54-g00ecf