?um/p1-90`String
extends clauseのvalueとして使用できます。指定されたString behaviourをinheritしようとするsubclass super callを含まなければなりません。このfunctionは呼び出されたとき、次のstepsを実行します:
String
このfunctionは、rest parameter codeUnitsを形成する任意の数のargumentsで呼び出すことができます。
これは呼び出されたとき、次のstepsを実行します:
このfunctionの
このfunctionは、rest parameter codePointsを形成する任意の数のargumentsで呼び出すことができます。
これは呼び出されたとき、次のstepsを実行します:
このfunctionの
String.prototypeのinitial valueは
このpropertyはattributes { [[Writable]]:
このfunctionはvariable number of argumentsで呼び出すことができます。first argumentはtemplateであり、remaining argumentsは
これは呼び出されたとき、次のstepsを実行します:
このfunctionはTagged Template(
String prototype objectは:
明示的に別途述べられない限り、以下で定義されるString prototype objectのmethodsはgenericではなく、それらに渡される
このmethodは、このobjectをStringへconvertしたresultであるString value内のindex positionにあるcode unitを含むsingle element Stringを返します。そのindexにelementが存在しない場合、resultはempty Stringです。resultはString valueであり、String objectではありません。
posがx.charAt(pos)のresultはx.substring(pos, pos + 1)のresultとequivalentです。
このmethodは呼び出されたとき、次のstepsを実行します:
このmethodは意図的にgenericです;その
このmethodは、このobjectをStringへconvertしたresultであるString内のindex positionにあるcode unitのnumeric valueであるNumber(216未満のnon-negative
このmethodは呼び出されたとき、次のstepsを実行します:
このmethodは意図的にgenericです;その
このmethodは、このobjectをStringへconvertしたresultであるString内のindex positionのstring elementから始まるUTF-16 encoded code point(
このmethodは呼び出されたとき、次のstepsを実行します:
このmethodは意図的にgenericです;その
このmethodが呼び出されると、
このmethodは呼び出されたとき、次のstepsを実行します:
このmethodの
このmethodは意図的にgenericです;その
String.prototype.constructorのinitial valueは
このmethodは呼び出されたとき、次のstepsを実行します:
first argumentがRegExpである場合にexceptionをthrowすることは、そのようなargument valuesをallowするextensionsをfuture editionsがdefineできるようにするために指定されています。
このmethodは意図的にgenericです;その
このmethodは呼び出されたとき、次のstepsを実行します:
searchStringが、このobjectをStringへconvertしたresultの
first argumentがRegExpである場合にexceptionをthrowすることは、そのようなargument valuesをallowするextensionsをfuture editionsがdefineできるようにするために指定されています。
このmethodは意図的にgenericです;その
searchStringが、このobjectをStringへconvertしたresultの
このmethodは呼び出されたとき、次のstepsを実行します:
このmethodは意図的にgenericです;その
このmethodは呼び出されたとき、次のstepsを実行します:
searchStringが、このobjectをStringへconvertしたresultの
このmethodは呼び出されたとき、次のstepsを実行します:
このmethodは意図的にgenericです;その
ECMA-402 Internationalization APIを含むECMAScript implementationは、このmethodをECMA-402 specificationで指定される通りにimplementしなければなりません。ECMAScript implementationがECMA-402 APIを含まない場合、このmethodの次のspecificationが使用されます:
このmethodは、
comparisonsを実行する前に、このmethodはStringsをprepareするために次のstepsを実行します:
このmethodのoptional secondおよびthird parametersのmeaningはECMA-402 specificationで定義されます;ECMA-402 supportを含まないimplementationsは、それらのparameter positionsに他のinterpretationをassignしてはなりません。
actual return valuesは、それらにadditional informationをencodingできるよう
このmethod自体はArray.prototype.sortへのargumentとして直接適していません。後者はtwo argumentsのfunctionをrequireするためです。
このmethodは、ECMAScript environmentがhost environmentから利用できる任意のlanguage- and/or locale-sensitive comparison functionalityにrelyしてもよく、host environmentのcurrent localeのconventionsに従ってcompareすることを意図しています。しかし、comparison capabilitiesにかかわらず、このmethodはUnicode Standardに従うcanonical equivalenceをrecognizeおよびhonourしなければなりません—例えば、以下のcomparisonsはすべて
// Å ANGSTROM SIGN vs.
// Å LATIN CAPITAL LETTER A + COMBINING RING ABOVE
"\u212B".localeCompare("A\u030A")
// Ω OHM SIGN vs.
// Ω GREEK CAPITAL LETTER OMEGA
"\u2126".localeCompare("\u03A9")
// ṩ LATIN SMALL LETTER S WITH DOT BELOW AND DOT ABOVE vs.
// ṩ LATIN SMALL LETTER S + COMBINING DOT ABOVE + COMBINING DOT BELOW
"\u1E69".localeCompare("s\u0307\u0323")
// ḍ̇ LATIN SMALL LETTER D WITH DOT ABOVE + COMBINING DOT BELOW vs.
// ḍ̇ LATIN SMALL LETTER D WITH DOT BELOW + COMBINING DOT ABOVE
"\u1E0B\u0323".localeCompare("\u1E0D\u0307")
// 가 HANGUL CHOSEONG KIYEOK + HANGUL JUNGSEONG A vs.
// 가 HANGUL SYLLABLE GA
"\u1100\u1161".localeCompare("\uAC00")
canonical equivalenceのdefinitionおよびdiscussionについては、Unicode Standardのchapters 2および3に加えて、Unicode Standard Annex #15, Unicode Normalization FormsおよびUnicode Technical Note #5, Canonical Equivalence in Applicationsを参照してください。Unicode Technical Standard #10, Unicode Collation Algorithmも参照してください。
このmethodは、Unicode Standardのchapter 3, section 3.7で定義されるUnicode compatibility equivalentsまたはcompatibility decompositionsをhonourすべきでないことがrecommendedされます。
このmethodは意図的にgenericです;その
このmethodは呼び出されたとき、次のstepsを実行します:
このmethodは意図的にgenericです;その
このmethodは、
これは呼び出されたとき、次のstepsを実行します:
String.prototype.splitと同様に、String.prototype.matchAllは通常、そのinputsをmutateせずにactするようにdesignedされています。このmethodは呼び出されたとき、次のstepsを実行します:
このmethodは意図的にgenericです;その
このmethodは呼び出されたとき、次のstepsを実行します:
このmethodは呼び出されたとき、次のstepsを実行します:
The abstract operation StringPaddingBuiltinsImpl takes arguments thisValue (an ECMAScript language value), maxLength (an ECMAScript language value), fillString (an ECMAScript language value), and placement (
The abstract operation StringPad takes arguments string (a String), maxLength (a non-negative
argument maxLengthは、stringのlengthより小さくならないようにclampedされます。
argument fillStringは
The abstract operation ToZeroPaddedDecimalString takes arguments n (a non-negative
このmethodは呼び出されたとき、次のstepsを実行します:
このmethodは、
このmethodは意図的にgenericです;その
このmethodは呼び出されたとき、次のstepsを実行します:
このmethodは意図的にgenericです;その
The abstract operation GetSubstitution takes arguments matched (a String), string (a String), position (a non-negative
このmethodは呼び出されたとき、次のstepsを実行します:
このmethodは呼び出されたとき、次のstepsを実行します:
このmethodは意図的にgenericです;その
このmethodは、このobjectをStringへconvertしたresultの
これは呼び出されたとき、次のstepsを実行します:
このmethodは意図的にgenericです;その
このmethodは、このobjectをStringへconvertしたresultのsubstringsが格納されたArrayを返します。substringsは、separatorのoccurrencesをleft to rightにsearchすることによってdetermineされます;これらのoccurrencesはreturned array内のいかなるStringのpartでもありませんが、String valueをdivide upする役割を果たします。separatorのvalueは任意のlengthのStringであってもよく、またはRegExpのように
これは呼び出されたとき、次のstepsを実行します:
separatorのvalueはempty Stringであってもよいです。この場合、separatorはinput Stringのbeginningまたはendにあるempty
separatorが
このmethodは意図的にgenericです;その
このmethodは呼び出されたとき、次のstepsを実行します:
first argumentがRegExpである場合にexceptionをthrowすることは、そのようなargument valuesをallowするextensionsをfuture editionsがdefineできるようにするために指定されています。
このmethodは意図的にgenericです;その
このmethodは、このobjectをStringへconvertしたresultの
いずれかのargumentが
startがendよりstrictly greaterである場合、それらはswappedされます。
これは呼び出されたとき、次のstepsを実行します:
このmethodは意図的にgenericです;その
ECMA-402 Internationalization APIを含むECMAScript implementationは、このmethodをECMA-402 specificationで指定される通りにimplementしなければなりません。ECMAScript implementationがECMA-402 APIを含まない場合、このmethodの次のspecificationが使用されます:
このmethodは、
toLowerCaseとexactly the sameに動作しますが、host environmentのcurrent localeのconventionsに対応するlocale-sensitive resultをyieldすることを意図している点が異なります。regular Unicode case mappingsとそのlanguageのrulesがconflictする少数のcases(Turkishなど)にのみdifferenceが生じます。
このmethodのoptional parametersのmeaningはECMA-402 specificationで定義されます;ECMA-402 supportを含まないimplementationsは、それらのparameter positionsを他の目的に使用してはなりません。
このmethodは意図的にgenericです;その
ECMA-402 Internationalization APIを含むECMAScript implementationは、このmethodをECMA-402 specificationで指定される通りにimplementしなければなりません。ECMAScript implementationがECMA-402 APIを含まない場合、このmethodの次のspecificationが使用されます:
このmethodは、
toUpperCaseとexactly the sameに動作しますが、host environmentのcurrent localeのconventionsに対応するlocale-sensitive resultをyieldすることを意図している点が異なります。regular Unicode case mappingsとそのlanguageのrulesがconflictする少数のcases(Turkishなど)にのみdifferenceが生じます。
このmethodのoptional parametersのmeaningはECMA-402 specificationで定義されます;ECMA-402 supportを含まないimplementationsは、それらのparameter positionsを他の目的に使用してはなりません。
このmethodは意図的にgenericです;その
このmethodは、
これは呼び出されたとき、次のstepsを実行します:
resultは、Unicode Character Database内のlocale-insensitive case mappingsに従ってderivedされなければなりません(これは明示的にfile UnicodeData.txtだけでなく、それにaccompaniesするfile SpecialCasing.txt内のすべてのlocale-insensitive mappingsも含みます)。
一部のcode pointsのcase mappingはmultiple code pointsをproduceする場合があります。この場合、result Stringはsource Stringとsame lengthでないことがあります。toUpperCaseとtoLowerCaseの両方がcontext-sensitive behaviourを持つため、methodsはsymmetricalではありません。言い換えると、s.toUpperCase().toLowerCase()は必ずしもs.toLowerCase()にequalではありません。
このmethodは意図的にgenericです;その
このmethodは呼び出されたとき、次のstepsを実行します:
String objectについて、このmethodはvalueOf methodとsame thingを返すことになります。
このmethodは、
StringがUnicode Default Case ConversionのtoUppercase algorithmを使用してmappedされる点を除き、String.prototype.toLowerCaseとexactly the same wayにbehaveします。
このmethodは意図的にgenericです;その
このmethodは、
これは呼び出されたとき、次のstepsを実行します:
このmethodは、
これは呼び出されたとき、次のstepsを実行します:
このmethodは意図的にgenericです;その
The abstract operation TrimString takes arguments arg (an ECMAScript language value) and where (
white spaceのdefinitionは
このmethodは、
これは呼び出されたとき、次のstepsを実行します:
このmethodは意図的にgenericです;その
このmethodは、
これは呼び出されたとき、次のstepsを実行します:
このmethodは意図的にgenericです;その
このmethodは呼び出されたとき、次のstepsを実行します:
The abstract operation ThisStringValue takes argument arg (an ECMAScript language value) and returns either a
このmethodは、String valueのcode pointsをiterateし、各code pointをString valueとしてreturnする
これは呼び出されたとき、次のstepsを実行します:
このmethodの
String instancesは
String instancesは
このString objectによって表されるString value内のelementsの数。
String objectがinitializeされると、このpropertyはunchangingです。これはattributes { [[Writable]]:
String Iteratorは、特定のString instance objectに対するspecific iterationを表すobjectです。String Iterator objectsにはnamed
%StringIteratorPrototype% objectは:
このpropertyはattributes { [[Writable]]:
RegExp objectはregular expressionおよびassociated flagsを含みます。
regular expressionsのformおよびfunctionalityは、Perl 5 programming languageのregular expression facilityをmodelにしています。
RegExp
associatedするu \u \u u
ここでの最初の2行はCharacterClassとequivalentです。
このsection内のいくつかのproductionsには、section
このsectionは
PropertyValueAliases.txtにlistedされていない場合、Syntax Errorです。
PropertyValueAliases.txtにlistedされているGeneral_Category (gc) propertyに対するUnicode property valueまたはproperty value aliasでもなく、The abstract operation CountLeftCapturingParensWithin takes argument parseNode (a ( terminalにmatchedする任意の( pattern characterです。
このsectionは
It performs the following steps when called:
The abstract operation CountLeftCapturingParensBefore takes argument parseNode (a
このsectionは
It performs the following steps when called:
The abstract operation MightBothParticipate takes arguments x (a
The
このsectionは
It is defined piecewise over the following productions:
“the MV of
The
このsectionは
It is defined piecewise over the following productions:
The
このsectionは
It is defined piecewise over the following productions:
| ControlEscape | Numeric Value | Code Point | Unicode Name | Symbol |
|---|---|---|---|---|
t
|
9 |
U+0009
|
CHARACTER TABULATION | <HT> |
n
|
10 |
U+000A
|
LINE FEED (LF) | <LF> |
v
|
11 |
U+000B
|
LINE TABULATION | <VT> |
f
|
12 |
U+000C
|
FORM FEED (FF) | <FF> |
r
|
13 |
U+000D
|
CARRIAGE RETURN (CR) | <CR> |
\0は<NUL> characterを表し、decimal digitをfollowすることはできません。
The
The abstract operation GroupSpecifiersThatMatch takes argument thisGroupName (a
The
The
The
regular expression patternは、以下でdescribedされるprocessを使用して
uもvも含まない場合はBMP patternです。そうでなければ、Unicode patternです。BMP patternは、Basic Multilingual Planeのrange内にあるUnicode code pointsである16-bit valuesのsequenceからなるものとしてinterpretedされるStringに対してmatchします。Unicode patternは、UTF-16を使用してencodedされたUnicode code pointsからなるものとしてinterpretedされるStringに対してmatchします。BMP patternのbehaviourをdescribeするcontextにおいて、“character”はsingle 16-bit Unicode BMP code pointを意味します。Unicode patternのbehaviourをdescribeするcontextにおいて、“character”はUTF-16 encoded code point(
例えば、single non-BMP character U+1D11E(MUSICAL SYMBOL G CLEF)としてsource textでexpressedされたpatternを考えます。Unicode patternとしてinterpretedされる場合、それはsingle code point U+1D11Eからなるsingle element(character)
Patternsは、non-BMP charactersがUTF-16 encodedされているECMAScript String valuesとしてRegExp
implementationは、UTF-16への、またはUTF-16からのそのようなtranslationsを実際にはperformしなくてもよいですが、このspecificationのsemanticsは、pattern matchingのresultがそのようなtranslationsがperformedされたかのようになることをrequireします。
以下のdescriptionsでは、次のinternal data structuresを使用します:
RegExp Recordは、compilation中およびpossibly matching中に必要なRegExpに関するinformationをstoreするために使用される
これは次のfieldsを持ちます:
| Field Name | Value | Meaning |
|---|---|---|
| [[IgnoreCase]] | a Boolean | |
| [[Multiline]] | a Boolean | |
| [[DotAll]] | a Boolean | |
| [[Unicode]] | a Boolean | |
| [[UnicodeSets]] | a Boolean | |
| [[CapturingGroupsCount]] | a non-negative |
RegExpのpattern内の |
The
Patternは
The
このsectionは
It is defined piecewise over the following productions:
| regular expression operatorはtwo alternativesをseparateします。patternはまずleft |によってskippedされたpatternのportion内のcapturing parenthesesは、Stringsではなく
/a|ab/.exec("abc")
は
/((a)|(ab))((c)|(bc))/.exec("abc")
はarray
["abc", "a", "a", undefined, "bc", undefined, "bc"]
を返し、
["abc", "ab", undefined, "ab", "c", "c", undefined]
ではありません。two alternativesがtriedされるorderはdirectionのvalueにindependentです。
Consecutive
resulting
The abstract operation RepeatMatcher takes arguments m (a
Compare
/a[a-z]{2,4}/.exec("abcdefghi")
これは
/a[a-z]{2,4}?/.exec("abcdefghi")
は
さらに次を考えます:
/(aa|aabaac|ba|b|c)*/.exec("aabaac")
これは、aboveのchoice point orderingにより、array
["aaba", "ba"]
を返し、次のいずれでもありません:
["aabaac", "aabaac"]
["aabaac", "c"]
上記のchoice pointsのorderingは、two numbers(unary notationでrepresented)のgreatest common divisorをcalculateするregular expressionを書くために使用できます。次のexampleは10と15のgcdをcalculateします:
"aaaaaaaaaa,aaaaaaaaaaaaaaa".replace(/^(a+)\1*,\1+$/, "$1")
これはunary notationでgcd
RepeatMatcherのstep
/(z)((a+)?(b+)?(c))*/.exec("zaacbbbcac")
で見ることができ、これはarray
["zaacbbbcac", "z", "ac", "a", undefined, "c"]
を返し、
["zaacbbbcac", "z", "ac", "a", "bbb", "c"]
ではありません。なぜなら、outermost *の各iterationが、quantified
RepeatMatcherのstep
/(a*)*/.exec("b")
または少しmore complicatedな:
/(a*)b\1+/.exec("baaaac")
これはarray
["b", ""]
を返します。
The abstract operation EmptyMatcher takes no arguments and returns a
The abstract operation MatchTwoAlternatives takes arguments m1 (a
The abstract operation MatchSequence takes arguments m1 (a
The
このsectionは
It is defined piecewise over the following productions:
y flagがpatternとともに使用される場合であっても、^は常にinputのbeginning、または(regexpRecord.[[Multiline]]が
form (?= )はzero-width positive lookaheadをspecifyします。succeedするには、(?= formへのbacktrackingはありません(このunusual behaviourはPerlからinheritedされています)。これは、
例えば、
/(?=(a+))/.exec("baaabac")
はfirst bの直後のempty Stringにmatchし、したがってarrayを返します:
["", "aaa"]
lookaheadへのbacktrackingがないことをillustrateするため、次を考えます:
/(?=(a+))a*b\1/.exec("baaabac")
このexpressionは
["aba", "a"]
を返し、次ではありません:
["aaaba", "a"]
form (?! )はzero-width negative lookaheadをspecifyします。succeedするには、
/(.*?)a(?!(a+)b\2c)\2(.*)/.exec("baaabaac")
は、some positive number n of a's、b、another n a's(first \2でspecified)、およびcがimmediately followedしないaを探します。second \2はnegative lookaheadの外側にあるため、
["baaabaac", "ba", undefined, "abaac"]
The abstract operation IsWordChar takes arguments regexpRecord (a
The
The
The
このsectionは
It is defined piecewise over the following productions:
form ( )のparenthesesは、\ followed by a non-zero decimal number)で使用されたり、replace Stringでreferencedされたり、regular expression matching (?: )を使用します。
\ followed by a non-zero decimal number nというformのescape sequenceは、nth set of capturing parentheses(
The abstract operation CharacterSetMatcher takes arguments regexpRecord (a
The abstract operation BackreferenceMatcher takes arguments regexpRecord (a
The abstract operation Canonicalize takes arguments regexpRecord (a
CaseFolding.txtがcharに対するsimpleまたはcommon case folding mappingを提供するなら、そのmappingをcharにapplyしたresultを返す。ß(U+00DF LATIN SMALL LETTER SHARP S)をssやSSへmapしません。ただし、Basic Latin blockの外側にあるcode pointsをその内側のcode pointsへmapすることはあります—例えば、ſ(U+017F LATIN SMALL LETTER LONG S)はs(U+0073 LATIN SMALL LETTER S)へcase-foldし、K(U+212A KELVIN SIGN)はk(U+006B LATIN SMALL LETTER K)へcase-foldします。それらのcode pointsを含むStringsは/[a-z]/uiのようなregular expressionsによってmatchedされます。
Ω(U+2126 OHM SIGN)はtoUppercaseではitselfへmappedされますが、toCasefoldではΩ(U+03A9 GREEK CAPITAL LETTER OMEGA)とともにω(U+03C9 GREEK SMALL LETTER OMEGA)へmappedされるため、/[ω]/uiおよび/[\u03A9]/uiによってmatchedされますが、/[ω]/iまたは/[\u03A9]/iによってはmatchedされません。また、Basic Latin blockの外側のcode pointはその内側のcode pointへmappedされないため、/[a-z]/iによってmatchedされません。
The abstract operation UpdateModifiers takes arguments regexpRecord (a
The
The
このsectionは
It is defined piecewise over the following productions:
patternがcaseをignoreする場合でも、rangeのtwo endsのcaseは、どのcharactersがrangeに属するかをdetermineする上でsignificantです。したがって、例えば、pattern /[E-F]/iはletters E、F、e、およびfのみにmatchします。一方、pattern /[E-f]/iはUnicode Basic Latin block内のすべてのuppercaseおよびlowercase lettersに加えて、symbols [, \, ], ^, _, and `にもmatchします。
- characterはliterallyに扱われることも、rangeをdenoteすることもできます。これは、
- U+002D (HYPHEN-MINUS)を含む\b、\B、およびbackreferencesを除き、regular expressionのrestでallowedされる任意のescape sequencesを使用できます。\bはbackspace characterを意味し、\Bおよびbackreferencesはerrorsをraiseします。
0, 1, 2, 3, 4, 5, 6, 7, 8, and 9を含むten-element General_Category, s)が、PropertyValueAliases.txtにlistedされているGeneral_Category (gc) propertyに対するUnicode property valueまたはproperty value aliasであるなら、resultはしばしばtwo or more rangesから構成されます。UnicodeSetsが
The abstract operation CharacterRange takes arguments charSet (a
The abstract operation HasEitherUnicodeFlag takes argument regexpRecord (a
The abstract operation WordCharacters takes argument regexpRecord (a \b、\B、\w、および\Wのpurposesにおいて“word characters”とconsideredされるcharactersを含む
The abstract operation AllCharacters takes argument regexpRecord (a
The abstract operation MaybeSimpleCaseFolding takes arguments regexpRecord (a CaseFolding.txt内のSimple Case Folding(
The abstract operation CharacterComplement takes arguments regexpRecord (a
The abstract operation UnicodeMatchProperty takes arguments regexpRecord (a
Implementationsは、
例えば、Script_Extensions(scx(property alias)はvalidですが、script_extensionsやScxはvalidではありません。
listed propertiesは、UTS18 RL1.2がrequireするもののsupersetを形成します。
これらのtables内のentriesのspellings(casingを含む)は、Unicode Character Databaseのfile PropertyAliases.txtで使用されるspellingsとmatchします。そのfile内のprecise spellingsはstableであることがguaranteedされています。
General_Category |
General_Category |
gc |
|
Script |
Script |
sc |
|
Script_Extensions |
Script_Extensions |
scx |
ASCII |
ASCII |
ASCII_Hex_Digit |
ASCII_Hex_Digit |
AHex |
|
Alphabetic |
Alphabetic |
Alpha |
|
Any |
Any |
Assigned |
Assigned |
Bidi_Control |
Bidi_Control |
Bidi_C |
|
Bidi_Mirrored |
Bidi_Mirrored |
Bidi_M |
|
Case_Ignorable |
Case_Ignorable |
CI |
|
Cased |
Cased |
Changes_When_Casefolded |
Changes_When_Casefolded |
CWCF |
|
Changes_When_Casemapped |
Changes_When_Casemapped |
CWCM |
|
Changes_When_Lowercased |
Changes_When_Lowercased |
CWL |
|
Changes_When_NFKC_Casefolded |
Changes_When_NFKC_Casefolded |
CWKCF |
|
Changes_When_Titlecased |
Changes_When_Titlecased |
CWT |
|
Changes_When_Uppercased |
Changes_When_Uppercased |
CWU |
|
Dash |
Dash |
Default_Ignorable_Code_Point |
Default_Ignorable_Code_Point |
DI |
|
Deprecated |
Deprecated |
Dep |
|
Diacritic |
Diacritic |
Dia |
|
Emoji |
Emoji |
Emoji_Component |
Emoji_Component |
EComp |
|
Emoji_Modifier |
Emoji_Modifier |
EMod |
|
Emoji_Modifier_Base |
Emoji_Modifier_Base |
EBase |
|
Emoji_Presentation |
Emoji_Presentation |
EPres |
|
Extended_Pictographic |
Extended_Pictographic |
ExtPict |
|
Extender |
Extender |
Ext |
|
Grapheme_Base |
Grapheme_Base |
Gr_Base |
|
Grapheme_Extend |
Grapheme_Extend |
Gr_Ext |
|
Hex_Digit |
Hex_Digit |
Hex |
|
IDS_Binary_Operator |
IDS_Binary_Operator |
IDSB |
|
IDS_Trinary_Operator |
IDS_Trinary_Operator |
IDST |
|
ID_Continue |
ID_Continue |
IDC |
|
ID_Start |
ID_Start |
IDS |
|
Ideographic |
Ideographic |
Ideo |
|
Join_Control |
Join_Control |
Join_C |
|
Logical_Order_Exception |
Logical_Order_Exception |
LOE |
|
Lowercase |
Lowercase |
Lower |
|
Math |
Math |
Noncharacter_Code_Point |
Noncharacter_Code_Point |
NChar |
|
Pattern_Syntax |
Pattern_Syntax |
Pat_Syn |
|
Pattern_White_Space |
Pattern_White_Space |
Pat_WS |
|
Quotation_Mark |
Quotation_Mark |
QMark |
|
Radical |
Radical |
Regional_Indicator |
Regional_Indicator |
RI |
|
Sentence_Terminal |
Sentence_Terminal |
STerm |
|
Soft_Dotted |
Soft_Dotted |
SD |
|
Terminal_Punctuation |
Terminal_Punctuation |
Term |
|
Unified_Ideograph |
Unified_Ideograph |
UIdeo |
|
Uppercase |
Uppercase |
Upper |
|
Variation_Selector |
Variation_Selector |
VS |
|
White_Space |
White_Space |
space |
|
XID_Continue |
XID_Continue |
XIDC |
|
XID_Start |
XID_Start |
XIDS |
Basic_Emoji |
Emoji_Keycap_Sequence |
RGI_Emoji_Modifier_Sequence |
RGI_Emoji_Flag_Sequence |
RGI_Emoji_Tag_Sequence |
RGI_Emoji_ZWJ_Sequence |
RGI_Emoji |
The abstract operation UnicodeMatchPropertyValue takes arguments p (
PropertyValueAliases.txtにlistedされている。Implementationsは、PropertyValueAliases.txtにlistedされているUnicode property valuesおよびproperty value aliasesをsupportしなければなりません。interoperabilityをensureするため、implementationsは他のproperty valuesまたはproperty value aliasesをsupportしてはなりません。
例えば、XpeoおよびOld_PersianはvalidなScript_Extensions valuesですが、xpeoおよびOld Persianはvalidではありません。
このalgorithmはUAX44にlistedされているsymbolic valuesのmatching rulesとは異なります:case、Is prefixはsupportされません。
The
The abstract operation RegExpCreate takes arguments pattern (an ECMAScript language value) and flags (a String or
The abstract operation RegExpAlloc takes argument newTarget (a
The abstract operation RegExpInitialize takes arguments obj (an Object), pattern (an ECMAScript language value), and flags (an ECMAScript language value) and returns either a
The abstract operation ParsePattern takes arguments patternText (a sequence of Unicode code points), u (a Boolean), and v (a Boolean) and returns a
このsectionは
It performs the following steps when called:
RegExp
extends clauseのvalueとして使用できます。指定されたRegExp behaviourをinheritしようとするsubclass super callを含まなければなりません。このfunctionは呼び出されたとき、次のstepsを実行します:
patternが
RegExp
このfunctionは、regular expression
これは呼び出されたとき、次のstepsを実行します:
\0 character escapeまたは\1のような\cの後のcontextについて同じことを行う。similar namesを持つにもかかわらず、RegExp.escapeはsimilar actionsをperformしません。前者はstringとしてrepresentationするためにpatternをescapeし、このfunctionはpatternの内側でrepresentationするためにstringをescapeします。
The abstract operation EncodeForRegExpEscape takes argument codePoint (a code point) and returns a String. これはcodePointにmatchingするための
RegExp.prototypeのinitial valueは
このpropertyはattributes { [[Writable]]:
RegExp[%Symbol.species%]は、set accessor functionが
このfunctionの
RegExp prototype methodsは通常、その
RegExp prototype objectは:
RegExp prototype objectは自身の
RegExp.prototype.constructorのinitial valueは
このmethodはstring内でregular expression patternのoccurrenceをsearchし、matchのresultsを含むArrayを返すか、stringがmatchしなかった場合は
これは呼び出されたとき、次のstepsを実行します:
RegExp.prototype.dotAllは、set accessor functionが
RegExp.prototype.flagsは、set accessor functionが
The abstract operation RegExpHasFlag takes arguments regexp (an ECMAScript language value) and codeUnit (a code unit) and returns either a
RegExp.prototype.globalは、set accessor functionが
RegExp.prototype.hasIndicesは、set accessor functionが
RegExp.prototype.ignoreCaseは、set accessor functionが
このmethodは呼び出されたとき、次のstepsを実行します:
このmethodの
このmethodは呼び出されたとき、次のstepsを実行します:
このmethodの
RegExp.prototype.multilineは、set accessor functionが
このmethodは呼び出されたとき、次のstepsを実行します:
このmethodの
このmethodは呼び出されたとき、次のstepsを実行します:
このmethodの
このRegExp objectの
RegExp.prototype.sourceは、set accessor functionが
The abstract operation EscapeRegExpPattern takes arguments pattern (a String) and flags (a String) and returns a String. It performs the following steps when called:
/または任意の///はsimilar namesを持つにもかかわらず、RegExp.escapeとEscapeRegExpPatternはsimilar actionsをperformしません。前者はpatternの内側でrepresentationするためにstringをescapeし、このfunctionはstringとしてrepresentationするためにpatternをescapeします。
このmethodは、stringをStringへconvertingしたresultのsubstringsがstoredされたArrayを返します。substringsは、
/a*?/[Symbol.split]("ab")はarray ["a", "b"]へevaluatesされ、一方/a*/[Symbol.split]("ab")はarray ["","b"]へevaluatesされます。)
stringがempty Stringである(またはそれへconvertsされる)場合、resultはregular expressionがempty Stringにmatchできるかどうかに依存します。matchできる場合、result arrayはelementsを含みません。そうでなければ、result arrayはone elementを含み、それはempty Stringです。
regular expressionがcapturing parenthesesを含む場合、separatorがmatchedされるたびに、capturing parenthesesのresults(任意の
/<(\/)?([^<>]+)>/[Symbol.split]("A<B>bold</B>and<CODE>coded</CODE>")
はarrayへevaluatesされます:
["A", undefined, "B", "bold", "/", "B", "and", undefined, "CODE", "coded", "/", "CODE", ""]
limitが
このmethodは呼び出されたとき、次のstepsを実行します:
このmethodの
このmethodは、このRegExp objectの
RegExp.prototype.stickyは、set accessor functionが
このmethodは呼び出されたとき、次のstepsを実行します:
returned Stringは、このobjectとsame behaviourを持つanother RegExp objectへevaluatesされる
RegExp.prototype.unicodeは、set accessor functionが
RegExp.prototype.unicodeSetsは、set accessor functionが
The abstract operation RegExpExec takes arguments regexp (an Object) and string (a String) and returns either a
callableな
The abstract operation RegExpBuiltinExec takes arguments regexp (an initialized RegExp instance) and string (a String) and returns either a
The abstract operation AdvanceStringIndex takes arguments string (a String), index (a non-negative
The abstract operation GetStringIndex takes arguments string (a String) and codePointIndex (a non-negative
Match Recordは、regular expression matchまたはcaptureのstartおよびend indicesをencapsulateするために使用される
Match Recordsは
| Field Name | Value | Meaning |
|---|---|---|
| [[StartIndex]] | a non-negative |
matchがbeginする(inclusive)stringのstartからのcode unitsの数。 |
| [[EndIndex]] | an |
matchがendする(exclusive)stringのstartからのcode unitsの数。 |
The abstract operation GetMatchString takes arguments string (a String) and match (a
The abstract operation GetMatchIndexPair takes arguments string (a String) and match (a
The abstract operation MakeMatchIndicesIndexPairArray takes arguments string (a String), indices (a
RegExp instancesは
ECMAScript 2015より前は、RegExp instancesはown RegExp.prototypeの
RegExp instancesはまた次のpropertyを持ちます:
RegExp String Iteratorは、some specific RegExp instance objectに対してmatchingしながら、some specific String instance object上のspecific iterationを表すobjectです。RegExp String Iterator objectsにはnamed
The abstract operation CreateRegExpStringIterator takes arguments regexp (an Object), string (a String), global (a Boolean), and fullUnicode (a Boolean) and returns an Object. It performs the following steps when called:
%RegExpStringIteratorPrototype% objectは:
このpropertyはattributes { [[Writable]]:
| Internal Slot | Type | Description |
|---|---|---|
| [[IteratingRegExp]] | an Object | iterationに使用されるregular expression。 |
| [[IteratedString]] | a String | iterateされているString value。 |
| [[Global]] | a Boolean | [[IteratingRegExp]]がglobalであるかどうかを示します。 |
| [[Unicode]] | a Boolean | [[IteratingRegExp]]がUnicode modeであるかどうかを示します。 |
| [[Done]] | a Boolean | iterationがcompleteしているかどうかを示します。 |