Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2023年9月.
unicodeSets は RegExp インスタンスのアクセサープロパティで、この正規表現に v フラグが使用されているかどうかを返します。
RegExp.prototype.unicodeSets は v フラグが使用されている場合は true を、そうでない場合は false を返します。v フラグは u フラグを「アップグレード」したもので、Unicode 関連の機能をより有効にするものです(u と v は同じ正規表現を互換性のない方法で解釈するので、両方のフラグを使用すると SyntaxError になります。)v フラグを使用すると、u フラグの説明で述べたすべての機能に加えて、以下の機能が得られます。
一部の u モードの正規表現は v モードで無効になることがあります。具体的には、文字クラスの構文が異なり、文字通りに表示できない文字があります。詳しくは v モード文字クラスを参照してください。
メモ: vモードは書記素クラスターを 1 文字として解釈しません。例えば、/[🇺🇳]/v は "🇺" に一致します。
unicodeSets の設定アクセサーは undefined です。このプロパティを直接変更することはできません。
| ECMAScript® 2027 Language Specification # sec-get-regexp.prototype.unicodesets |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2025年11月10日 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.