正则表达式参考:捕获组和反向引用正则表达式参考:捕获组和反向引用正则表达式参考:捕获组和反向引用正则表达式参考:捕获组和反向引用
  • 文章
  • 正则表达式
    • 工具
  • 登录
找到的结果: {phrase} (显示: {results_count} 共: {results_count_total})
显示: {results_count} 共: {results_count_total}

加载更多搜索结果...

搜索范围
模糊匹配
搜索标题
搜索内容
发表 admin at 2024年3月5日
类别
  • 正则表达式
标签
正则表达式参考:捕获组和反向引用
  • 简
  • 繁
  • En
关于正则表达式 » 正则表达式参考 » 正则表达式参考:捕获组和反向引用

正则表达式参考
简介
目录
快速参考
字符
基本功能
字符类别
简写
锚点
字词边界
量词
Unicode
捕获组和反向引用
命名组和反向引用
特殊组
模式修饰词
递归和平衡组
替换参考
字符
符合文本和反向引用
内容和大小写转换
条件式
此网站的更多信息
简介
正则表达式快速入门
正则表达式教程
替换字符串教程
应用程序和语言
正则表达式范例
正则表达式参考
替换字符串参考

正则表达式参考:捕获组和反向引用

功能语法说明范例.NET Java Perl PCRE PCRE2 PHP Delphi R JavaScript VBScript XRegExp Python Ruby std::regex Boost Tcl ARE POSIX BRE POSIX ERE GNU BRE GNU ERE Oracle XML XPath
捕获组 (regex) 括弧将括弧之间的正则表达式分组。它们会截取括弧内正则表达式所配对到的文本,并将其保存到编号群组中,可以使用编号反向引用重复使用。它们允许您将正则表达式操作符套用至整个分组正则表达式。 (abc){3} 会配对 abcabcabc。第一个群组会配对 abc。 是是是是是是是是是是是是是ECMA
extended
egrep
awk
ECMA
extended
egrep
awk
是否是否是是是是
捕获组 \(regex\) 转义的括弧将括弧之间的正则表达式分组。它们会截取括弧内正则表达式所配对到的文本,并将其保存到编号群组中,可以使用编号反向引用重复使用。它们允许您将正则表达式操作符套用至整个分组正则表达式。 \(abc\){3} 会配对 abcabcabc。第一个群组会配对 abc。 否否否否否否否否否否否否否basic
grep
basic
grep
否是否是否否否否
非捕获组 (?:regex) 非截取括号将 regex 分组,以便您可以套用 regex 算子,但不会截取任何内容。 (?:abc){3} 会配对 abcabcabc。没有群组。 是是是是是是是是是是是是是ECMAECMA是否否否否否否是
反向引用 \1 到 \9 以第 1 到第 9 个编号捕获组之间配对的文本取代。 (abc|def)=\1 会配对 abc=abc 或 def=def,但不会配对 abc=def 或 def=abc。 是是是是是是是是是是是是是ECMA
basic
grep
ECMA
basic
grep
是是否是是是否是
反向引用 \10 到 \99 以第 10 到第 99 个编号捕获组之间配对的文本取代。 是是是是是是是是是是是是是ECMA否是否否否否否否是
反向引用 \k<1> 到 \k<99> 以第 1 到第 99 个编号捕获组之间配对的文本取代。 (abc|def)=\k<1> 会配对 abc=abc 或 def=def,但不会配对 abc=def 或 def=abc。 是否否否否否否否否否是否1.9否ECMA
1.47–1.83
否否否否否否否否
反向引用 \k'1' 到 \k'99' 以第 1 到第 99 个编号捕获组之间配对的文本取代。 (abc|def)=\k'1' 会配对 abc=abc 或 def=def,但不会配对 abc=def 或 def=abc。 是否否否否否否否否否否否1.9否ECMA
1.47–1.83
否否否否否否否否
反向引用 \g1 到 \g99 以第 1 到第 99 个编号捕获组之间配对的文本取代。 (abc|def)=\g1 会配对 abc=abc 或 def=def,但不会配对 abc=def 或 def=abc。 否否5.107.0是5.2.2是是否否否否否否ECMA
1.42–1.83
否否否否否否否否
反向引用 \g{1} 到 \g{99} 以第 1 到第 99 个编号捕获组之间配对的文本取代。 (abc|def)=\g{1} 会配对 abc=abc 或 def=def,但不会配对 abc=def 或 def=abc。 否否5.107.0是5.2.2是是否否否否否否ECMA
1.42–1.83
否否否否否否否否
反向引用 \g<1> 到 \g<99> 以第 1 到第 99 个编号捕获组之间配对的文本取代。 (abc|def)=\g<1> 会配对 abc=abc 或 def=def,但不会配对 abc=def 或 def=abc。 否否否否否否否否否否否否否否ECMA
1.47–1.83
否否否否否否否否
反向引用 \g'1' 到 \g'99' 以第 1 到第 99 个编号捕获组之间配对的文本取代。 (abc|def)=\g'1' 会配对 abc=abc 或 def=def,但不会配对 abc=def 或 def=abc。 否否否否否否否否否否否否否否ECMA
1.47–1.83
否否否否否否否否
反向引用 (?P=1) 到 (?P=99) 以第 1 到第 99 个编号捕获组之间配对的文本取代。 (abc|def)=(?P=1) 会配对 abc=abc 或 def=def,但不会配对 abc=def 或 def=abc。 否否否否否否否否否否否否否否否否否否否否否否否
相对后向参照 \k<-1>、\k<-2> 等 以从右至左从后向参照开始,由指定数字计算命名或编号捕获组的打开括号数目,所匹配的文本取代。 (a)(b)(c)(d)\k<-3> 匹配 abcdb。 否否否否否否否否否否否否1.9否ECMA
1.47–1.83
否否否否否否否否
相对后向参照 \k'-1'、\k'-2' 等 以从右至左从后向参照开始,由指定数字计算命名或编号捕获组的打开括号数目,所匹配的文本取代。 (a)(b)(c)(d)\k'-3' 匹配 abcdb。 否否否否否否否否否否否否1.9否ECMA
1.47–1.83
否否否否否否否否
相对后向参照 \g-1、\g-2 等 以从右至左从后向参照开始,由指定数字计算命名或编号捕获组的打开括号数目,所匹配的文本取代。 (a)(b)(c)(d)\g-3 匹配 abcdb。 否否5.107.0是5.2.2是是否否否否否否ECMA
1.42–1.83
否否否否否否否否
相对后向参照 \g{-1}、\g{-2} 等 以从右至左从后向参照开始,由指定数字计算命名或编号捕获组的打开括号数目,所匹配的文本取代。 (a)(b)(c)(d)\g{-3} 匹配 abcdb。 否否5.107.0是5.2.2是是否否否否否否ECMA
1.42–1.83
否否否否否否否否
相对后向参照 \g<-1>、\g<-2> 等 以从右至左从后向参照开始,由指定数字计算命名或编号捕获组的打开括号数目,所匹配的文本取代。 (a)(b)(c)(d)\g<-3> 匹配 abcdb。 否否否否否否否否否否否否否否ECMA
1.47–1.83
否否否否否否否否
相对后向参照 \g'-1'、\g'-2' 等 以从右至左从后向参照开始,由指定数字计算命名或编号捕获组的打开括号数目,所匹配的文本取代。 (a)(b)(c)(d)\g'-3' 匹配 abcdb。 否否否否否否否否否否否否否否ECMA
1.47–1.83
否否否否否否否否
后向参照失败 任何编号后向参照 对未参与匹配尝试的群组的后向参照无法匹配。 (a)?\1 匹配 aa,但无法匹配 b。 非 ECMA是是是是是是是忽略忽略忽略是是ECMA
basic
grep
忽略
ECMA
1.47–1.83
是是不适用是是是不适用忽略
无效的反向引用 任何编号后向参照 对根本不存在的群组的反向引用是有效的,但无法比对任何内容。 (a)?\2|b 在 aab 中比对 b。 错误是错误错误错误错误错误错误错误错误错误错误仅限 1.8ECMA
basic
grep
错误
ECMA
basic
grep
错误
错误错误不适用错误错误错误不适用错误
嵌套反向引用 任何编号后向参照 反向引用可以在它们引用的群组内部使用。 (a\1?){3} 比对 aaaaaa。 是是是是是是是是忽略是忽略错误失败ECMA
basic
grep
错误
ECMA
1.78–1.83 失败
错误错误不适用错误错误错误不适用错误
前向参照 任何编号后向参照 反向引用可以在它们引用的群组之前使用。 (\2?(a)){3} 比对 aaaaaa。 非 ECMA是是是是是是是忽略错误错误错误是ECMA
basic
grep
错误
ECMA
1.78–1.83
错误错误不适用错误错误错误不适用错误
功能语法说明范例.NET Java Perl PCRE PCRE2 PHP Delphi R JavaScript VBScript XRegExp Python Ruby std::regex Boost Tcl ARE POSIX BRE POSIX ERE GNU BRE GNU ERE Oracle XML XPath
正規表示式參考:擷取群組和反向參照
  • 简
  • 繁
  • En
關於正規表示式 » 正規表示式參考 » 正規表示式參考:擷取群組和反向參照

正規表示式參考
簡介
目錄
快速參考
字元
基本功能
字元類別
簡寫
錨點
字詞邊界
量詞
Unicode
擷取群組和反向參照
命名群組和反向參照
特殊群組
模式修飾詞
遞迴和平衡群組
替換參考
字元
符合文字和反向參照
內容和大小寫轉換
條件式
此網站的更多資訊
簡介
正規表示式快速入門
正規表示式教學
替換字串教學
應用程式和語言
正規表示式範例
正規表示式參考
替換字串參考

正規表示式參考:擷取群組和反向參照

功能語法說明範例.NET Java Perl PCRE PCRE2 PHP Delphi R JavaScript VBScript XRegExp Python Ruby std::regex Boost Tcl ARE POSIX BRE POSIX ERE GNU BRE GNU ERE Oracle XML XPath
擷取群組 (regex) 括弧將括弧之間的正規表示式分組。它們會擷取括弧內正規表示式所配對到的文字,並將其儲存到編號群組中,可以使用編號反向參照重複使用。它們允許您將正規表示式運算子套用至整個分組正規表示式。 (abc){3} 會配對 abcabcabc。第一個群組會配對 abc。 是是是是是是是是是是是是是ECMA
extended
egrep
awk
ECMA
extended
egrep
awk
是否是否是是是是
擷取群組 \(regex\) 跳脫的括弧將括弧之間的正規表示式分組。它們會擷取括弧內正規表示式所配對到的文字,並將其儲存到編號群組中,可以使用編號反向參照重複使用。它們允許您將正規表示式運算子套用至整個分組正規表示式。 \(abc\){3} 會配對 abcabcabc。第一個群組會配對 abc。 否否否否否否否否否否否否否basic
grep
basic
grep
否是否是否否否否
非擷取群組 (?:regex) 非擷取括號將 regex 分組,以便您可以套用 regex 算子,但不會擷取任何內容。 (?:abc){3} 會配對 abcabcabc。沒有群組。 是是是是是是是是是是是是是ECMAECMA是否否否否否否是
反向參照 \1 到 \9 以第 1 到第 9 個編號擷取群組之間配對的文字取代。 (abc|def)=\1 會配對 abc=abc 或 def=def,但不會配對 abc=def 或 def=abc。 是是是是是是是是是是是是是ECMA
basic
grep
ECMA
basic
grep
是是否是是是否是
反向參照 \10 到 \99 以第 10 到第 99 個編號擷取群組之間配對的文字取代。 是是是是是是是是是是是是是ECMA否是否否否否否否是
反向參照 \k<1> 到 \k<99> 以第 1 到第 99 個編號擷取群組之間配對的文字取代。 (abc|def)=\k<1> 會配對 abc=abc 或 def=def,但不會配對 abc=def 或 def=abc。 是否否否否否否否否否是否1.9否ECMA
1.47–1.83
否否否否否否否否
反向參照 \k'1' 到 \k'99' 以第 1 到第 99 個編號擷取群組之間配對的文字取代。 (abc|def)=\k'1' 會配對 abc=abc 或 def=def,但不會配對 abc=def 或 def=abc。 是否否否否否否否否否否否1.9否ECMA
1.47–1.83
否否否否否否否否
反向參照 \g1 到 \g99 以第 1 到第 99 個編號擷取群組之間配對的文字取代。 (abc|def)=\g1 會配對 abc=abc 或 def=def,但不會配對 abc=def 或 def=abc。 否否5.107.0是5.2.2是是否否否否否否ECMA
1.42–1.83
否否否否否否否否
反向參照 \g{1} 到 \g{99} 以第 1 到第 99 個編號擷取群組之間配對的文字取代。 (abc|def)=\g{1} 會配對 abc=abc 或 def=def,但不會配對 abc=def 或 def=abc。 否否5.107.0是5.2.2是是否否否否否否ECMA
1.42–1.83
否否否否否否否否
反向參照 \g<1> 到 \g<99> 以第 1 到第 99 個編號擷取群組之間配對的文字取代。 (abc|def)=\g<1> 會配對 abc=abc 或 def=def,但不會配對 abc=def 或 def=abc。 否否否否否否否否否否否否否否ECMA
1.47–1.83
否否否否否否否否
反向參照 \g'1' 到 \g'99' 以第 1 到第 99 個編號擷取群組之間配對的文字取代。 (abc|def)=\g'1' 會配對 abc=abc 或 def=def,但不會配對 abc=def 或 def=abc。 否否否否否否否否否否否否否否ECMA
1.47–1.83
否否否否否否否否
反向參照 (?P=1) 到 (?P=99) 以第 1 到第 99 個編號擷取群組之間配對的文字取代。 (abc|def)=(?P=1) 會配對 abc=abc 或 def=def,但不會配對 abc=def 或 def=abc。 否否否否否否否否否否否否否否否否否否否否否否否
相對後向參照 \k<-1>、\k<-2> 等 以從右至左從後向參照開始,由指定數字計算命名或編號擷取群組的開啟括號數目,所匹配的文字取代。 (a)(b)(c)(d)\k<-3> 匹配 abcdb。 否否否否否否否否否否否否1.9否ECMA
1.47–1.83
否否否否否否否否
相對後向參照 \k'-1'、\k'-2' 等 以從右至左從後向參照開始,由指定數字計算命名或編號擷取群組的開啟括號數目,所匹配的文字取代。 (a)(b)(c)(d)\k'-3' 匹配 abcdb。 否否否否否否否否否否否否1.9否ECMA
1.47–1.83
否否否否否否否否
相對後向參照 \g-1、\g-2 等 以從右至左從後向參照開始,由指定數字計算命名或編號擷取群組的開啟括號數目,所匹配的文字取代。 (a)(b)(c)(d)\g-3 匹配 abcdb。 否否5.107.0是5.2.2是是否否否否否否ECMA
1.42–1.83
否否否否否否否否
相對後向參照 \g{-1}、\g{-2} 等 以從右至左從後向參照開始,由指定數字計算命名或編號擷取群組的開啟括號數目,所匹配的文字取代。 (a)(b)(c)(d)\g{-3} 匹配 abcdb。 否否5.107.0是5.2.2是是否否否否否否ECMA
1.42–1.83
否否否否否否否否
相對後向參照 \g<-1>、\g<-2> 等 以從右至左從後向參照開始,由指定數字計算命名或編號擷取群組的開啟括號數目,所匹配的文字取代。 (a)(b)(c)(d)\g<-3> 匹配 abcdb。 否否否否否否否否否否否否否否ECMA
1.47–1.83
否否否否否否否否
相對後向參照 \g'-1'、\g'-2' 等 以從右至左從後向參照開始,由指定數字計算命名或編號擷取群組的開啟括號數目,所匹配的文字取代。 (a)(b)(c)(d)\g'-3' 匹配 abcdb。 否否否否否否否否否否否否否否ECMA
1.47–1.83
否否否否否否否否
後向參照失敗 任何編號後向參照 對未參與匹配嘗試的群組的後向參照無法匹配。 (a)?\1 匹配 aa,但無法匹配 b。 非 ECMA是是是是是是是忽略忽略忽略是是ECMA
basic
grep
忽略
ECMA
1.47–1.83
是是不適用是是是不適用忽略
無效的反向參照 任何編號後向參照 對根本不存在的群組的反向參照是有效的,但無法比對任何內容。 (a)?\2|b 在 aab 中比對 b。 錯誤是錯誤錯誤錯誤錯誤錯誤錯誤錯誤錯誤錯誤錯誤僅限 1.8ECMA
basic
grep
錯誤
ECMA
basic
grep
錯誤
錯誤錯誤不適用錯誤錯誤錯誤不適用錯誤
巢狀反向參照 任何編號後向參照 反向參照可以在它們引用的群組內部使用。 (a\1?){3} 比對 aaaaaa。 是是是是是是是是忽略是忽略錯誤失敗ECMA
basic
grep
錯誤
ECMA
1.78–1.83 失敗
錯誤錯誤不適用錯誤錯誤錯誤不適用錯誤
前向參照 任何編號後向參照 反向參照可以在它們引用的群組之前使用。 (\2?(a)){3} 比對 aaaaaa。 非 ECMA是是是是是是是忽略錯誤錯誤錯誤是ECMA
basic
grep
錯誤
ECMA
1.78–1.83
錯誤錯誤不適用錯誤錯誤錯誤不適用錯誤
功能語法說明範例.NET Java Perl PCRE PCRE2 PHP Delphi R JavaScript VBScript XRegExp Python Ruby std::regex Boost Tcl ARE POSIX BRE POSIX ERE GNU BRE GNU ERE Oracle XML XPath
Regular Expression Reference: Capturing Groups and Backreferences
  • 简
  • 繁
  • En
About Regular Expressions » Regular Expressions Reference » Regular Expression Reference: Capturing Groups and Backreferences

Regex Reference
Introduction
Table of Contents
Quick Reference
Characters
Basic Features
Character Classes
Shorthands
Anchors
Word Boundaries
Quantifiers
Unicode
Capturing Groups & Backreferences
Named Groups & Backreferences
Special Groups
Mode Modifiers
Recursion & Balancing Groups
Replacement Reference
Characters
Matched Text & Backreferences
Context & Case Conversion
Conditionals
More on This Site
Introduction
Regular Expressions Quick Start
Regular Expressions Tutorial
Replacement Strings Tutorial
Applications and Languages
Regular Expressions Examples
Regular Expressions Reference
Replacement Strings Reference

Regular Expression Reference: Capturing Groups and Backreferences

FeatureSyntaxDescriptionExample.NET Java Perl PCRE PCRE2 PHP Delphi R JavaScript VBScript XRegExp Python Ruby std::regex Boost Tcl ARE POSIX BRE POSIX ERE GNU BRE GNU ERE Oracle XML XPath
Capturing group (regex) Parentheses group the regex between them. They capture the text matched by the regex inside them into a numbered group that can be reused with a numbered backreference. They allow you to apply regex operators to the entire grouped regex. (abc){3} matches abcabcabc. First group matches abc. YESYESYESYESYESYESYESYESYESYESYESYESYESECMA
extended
egrep
awk
ECMA
extended
egrep
awk
YESnoYESnoYESYESYESYES
Capturing group \(regex\) Escaped parentheses group the regex between them. They capture the text matched by the regex inside them into a numbered group that can be reused with a numbered backreference. They allow you to apply regex operators to the entire grouped regex. \(abc\){3} matches abcabcabc. First group matches abc. nononononononononononononobasic
grep
basic
grep
noYESnoYESnononono
Non-capturing group (?:regex) Non-capturing parentheses group the regex so you can apply regex operators, but do not capture anything. (?:abc){3} matches abcabcabc. No groups. YESYESYESYESYESYESYESYESYESYESYESYESYESECMAECMAYESnonononononoYES
Backreference \1 through \9 Substituted with the text matched between the 1st through 9th numbered capturing group. (abc|def)=\1 matches abc=abc or def=def, but not abc=def or def=abc. YESYESYESYESYESYESYESYESYESYESYESYESYESECMA
basic
grep
ECMA
basic
grep
YESYESnoYESYESYESnoYES
Backreference \10 through \99 Substituted with the text matched between the 10th through 99th numbered capturing group. YESYESYESYESYESYESYESYESYESYESYESYESYESECMAnoYESnonononononoYES
Backreference \k<1> through \k<99> Substituted with the text matched between the 1st through 99th numbered capturing group. (abc|def)=\k<1> matches abc=abc or def=def, but not abc=def or def=abc. YESnononononononononoYESno1.9noECMA
1.47–1.83
nononononononono
Backreference \k'1' through \k'99' Substituted with the text matched between the 1st through 99th numbered capturing group. (abc|def)=\k'1' matches abc=abc or def=def, but not abc=def or def=abc. YESnonononononononononono1.9noECMA
1.47–1.83
nononononononono
Backreference \g1 through \g99 Substituted with the text matched between the 1st through 99th numbered capturing group. (abc|def)=\g1 matches abc=abc or def=def, but not abc=def or def=abc. nono5.107.0YES5.2.2YESYESnonononononoECMA
1.42–1.83
nononononononono
Backreference \g{1} through \g{99} Substituted with the text matched between the 1st through 99th numbered capturing group. (abc|def)=\g{1} matches abc=abc or def=def, but not abc=def or def=abc. nono5.107.0YES5.2.2YESYESnonononononoECMA
1.42–1.83
nononononononono
Backreference \g<1> through \g<99> Substituted with the text matched between the 1st through 99th numbered capturing group. (abc|def)=\g<1> matches abc=abc or def=def, but not abc=def or def=abc. nonononononononononononononoECMA
1.47–1.83
nononononononono
Backreference \g'1' through \g'99' Substituted with the text matched between the 1st through 99th numbered capturing group. (abc|def)=\g'1' matches abc=abc or def=def, but not abc=def or def=abc. nonononononononononononononoECMA
1.47–1.83
nononononononono
Backreference (?P=1) through (?P=99) Substituted with the text matched between the 1st through 99th numbered capturing group. (abc|def)=(?P=1) matches abc=abc or def=def, but not abc=def or def=abc. nonononononononononononononononononononononono
Relative Backreference \k<-1>, \k<-2>, etc. Substituted with the text matched by the capturing group that can be found by counting as many opening parentheses of named or numbered capturing groups as specified by the number from right to left starting at the backreference. (a)(b)(c)(d)\k<-3> matches abcdb. nononononononononononono1.9noECMA
1.47–1.83
nononononononono
Relative Backreference \k'-1', \k'-2', etc. Substituted with the text matched by the capturing group that can be found by counting as many opening parentheses of named or numbered capturing groups as specified by the number from right to left starting at the backreference. (a)(b)(c)(d)\k'-3' matches abcdb. nononononononononononono1.9noECMA
1.47–1.83
nononononononono
Relative Backreference \g-1, \g-2, etc. Substituted with the text matched by the capturing group that can be found by counting as many opening parentheses of named or numbered capturing groups as specified by the number from right to left starting at the backreference. (a)(b)(c)(d)\g-3 matches abcdb. nono5.107.0YES5.2.2YESYESnonononononoECMA
1.42–1.83
nononononononono
Relative Backreference \g{-1}, \g{-2}, etc. Substituted with the text matched by the capturing group that can be found by counting as many opening parentheses of named or numbered capturing groups as specified by the number from right to left starting at the backreference. (a)(b)(c)(d)\g{-3} matches abcdb. nono5.107.0YES5.2.2YESYESnonononononoECMA
1.42–1.83
nononononononono
Relative Backreference \g<-1>, \g<-2>, etc. Substituted with the text matched by the capturing group that can be found by counting as many opening parentheses of named or numbered capturing groups as specified by the number from right to left starting at the backreference. (a)(b)(c)(d)\g<-3> matches abcdb. nonononononononononononononoECMA
1.47–1.83
nononononononono
Relative Backreference \g'-1', \g'-2', etc. Substituted with the text matched by the capturing group that can be found by counting as many opening parentheses of named or numbered capturing groups as specified by the number from right to left starting at the backreference. (a)(b)(c)(d)\g'-3' matches abcdb. nonononononononononononononoECMA
1.47–1.83
nononononononono
Failed backreference Any numbered backreference Backreferences to groups that did not participate in the match attempt fail to match. (a)?\1 matches aa but fails to match b. non‑ECMAYESYESYESYESYESYESYESignoredignoredignoredYESYESECMA
basic
grep
ignored
ECMA
1.47–1.83
YESYESn/aYESYESYESn/aignored
Invalid backreference Any numbered backreference Backreferences to groups that do not exist at all are valid but fail to match anything. (a)?\2|b matches b in aab. errorYESerrorerrorerrorerrorerrorerrorerrorerrorerrorerror1.8 onlyECMA
basic
grep
error
ECMA
basic
grep
error
errorerrorn/aerrorerrorerrorn/aerror
Nested backreference Any numbered backreference Backreferences can be used inside the group they reference. (a\1?){3} matches aaaaaa. YESYESYESYESYESYESYESYESignoredYESignorederrorfailECMA
basic
grep
error
ECMA
1.78–1.83 fail
errorerrorn/aerrorerrorerrorn/aerror
Forward reference Any numbered backreference Backreferences can be used before the group they reference. (\2?(a)){3} matches aaaaaa. non‑ECMAYESYESYESYESYESYESYESignorederrorerrorerrorYESECMA
basic
grep
error
ECMA
1.78–1.83
errorerrorn/aerrorerrorerrorn/aerror
FeatureSyntaxDescriptionExample.NET Java Perl PCRE PCRE2 PHP Delphi R JavaScript VBScript XRegExp Python Ruby std::regex Boost Tcl ARE POSIX BRE POSIX ERE GNU BRE GNU ERE Oracle XML XPath
©2015-2025 艾丽卡 support@alaica.com