| Replacement Reference |
| Characters |
| Matched Text & Backreferences |
| Case Conversion |
| Context |
| Conditionals |
The regular expressions reference on this website functions both as a reference to all available regex syntax and as a comparison of the features supported by the regular expression flavors discussed in the tutorial. The reference tables pack an incredible amount of information. To get the most out of them, follow this legend to learn how to read them.
The tables have six columns for each regular expression feature. The first four explain the feature.
| Feature | The name of the feature, which also serves as a link to the relevant section in the tutorial. |
|---|---|
| Syntax | The actual regex syntax for this feature. If the syntax is fixed, it is simply shown as such. If the syntax has variable elements, the syntax is described. |
| Description | Summary of what the feature does. |
| Example | Functional regular expression that demonstrates the feature. |
The final two columns indicate whether your two chosen regular expression flavors support this particular feature. You can change the flavors using the drop-down lists above the table. There are many possible indicators.
| YES | All versions of this flavor support this feature. |
| 3.0 | Version 3.0 and all later versions of this flavor support this feature. Earlier versions do not support it. |
| 2.0 only | Only version 2.0 supports this feature. Earlier and later versions do not support it. |
| 2.0–2.9 | Only versions 2.0 through 2.9 supports this feature. Earlier and later versions do not support it. |
| Unicode | This feature works with Unicode characters in all versions of this flavor. |
| code page | This feature works with the characters in the active code page in all versions of this flavor. |
| ASCII | This feature works with ASCII characters only in all versions of this flavor. |
| 3.0 Unicode | This feature works with Unicode characters in versions 3.0 and later of this flavor. Earlier versions do not support it at all. |
| 3.0 Unicode 2.0 ASCII | This feature works with Unicode characters in versions 3.0 and later this flavor. It works with ASCII characters in versions 2.0 through 2.9. Earlier versions do not support it at all. |
| 3.0 Unicode 2.0 code page | This feature works with Unicode characters in versions 3.0 and later this flavor. It works with the characters in the active code page in versions 2.0 through 2.9. Earlier versions do not support it at all. |
| string | The regex flavor does not support this syntax. But string literals in the programming language that this regex flavor is normally used with do support this syntax. |
| 3.0 1.0 string | Version 3.0 and later of this regex flavor support this syntax. Earlier versions of the regex flavor do not support this syntax. But string literals in the programming language that this regex flavor is normally used with have supported this syntax since version 1.0. |
| option | All versions of this regex flavor support this feature if you set a particular option or precede it with a particular mode modifier. |
| option 3.0 | Version 3.0 and all later versions of this regex flavor support this feature if you set a particular option or precede it with a particular mode modifier. Earlier versions either do not support the syntax at all or do not support the mode modifier to change the behavior of the syntax to what the feature describes. |
| 3.0 2.0 fail | Version 3.0 and all later versions of this regex flavor support this feature. Version 2.0 all later releases prior to 3.0 recognize the syntax, but always fail to match this regex token. Versions prior to 2.0 do not support the syntax. |
| 3.0 2.0 error | Version 3.0 and all later versions of this regex flavor support this feature. Version 2.0 all later releases prior to 3.0 recognize the syntax, but treat it as an error. Versions prior to 2.0 do not support the syntax. |
| no | No version of this flavor support this feature. No indication is given as to what this syntax actually does. The same syntax may be used for a different feature which is indicated elsewhere in the reference table. Or the syntax may trigger an error or it may be interpreted as plain text. |
| n/a | This feature is not applicable to this regex flavor. Features that describe the behavior of certain syntax introduced earlier in the reference table show n/a for flavors that do not support that syntax at all. |
| fail | The syntax is recognized by the flavor and regular expressions using it work, but this particular regex token always fails to match. The regex can only find matches if this token is made optional by alternation or a quantifier. |
| 2.0–2.9 fail | Versions 2.0 through 2.9 recognize the syntax, but always fail to match this regex token. Earlier and later versions either don’t recognize the syntax or treat it as a syntax error. |
| ignored | The syntax is recognized by the flavor but it does not do anything useful. This particular regex token always finds a zero-length match. |
| error | The syntax is recognized by the flavor but it is treated as a syntax error. |
When this legend says “all versions” or “no version”, that means all or none of the versions of each flavor that are covered by the reference tables:
| JGsoft | V1: EditPad 6 and 7; PowerGREP 3 and 4; AceText 3 V2: EditPad 8; PowerGREP 5 |
|---|---|
| Python | 2.4–3.13 |
| JavaScript | Latest versions of Chrome, Edge, and Firefox |
| VBScript | VBscript and Internet Explorer in quirks mode |
| XRegExp | 5.1.0 |
| .NET | 1.0–9.0 (excluding .NET Core 1.0.0–3.1.0) |
| Java | 4–24 |
| ICU | 55–77 |
| RE2 | August 2017 until August 2025 |
| Perl | 5.12–5.40 |
| PCRE | 4.5–8.45 |
| PCRE2 | 10.00–10.45 |
| PHP | 5.5.0–8.3.25 |
| Delphi | XE–XE8 & 10–10.4 & 11–12; TRegEx only; also applies to C++Builder XE–XE8 & 10–10.4 & 11–12 |
| R | 2.14.0–4.4.1 |
| Ruby | 1.8–3.4 |
| std::regex | Visual C++ 2010–2022 (Dinkumware std library) |
| boost::regex | 1.38–1.39 & 1.42–1.89 |
| Tcl ARE | 8.4–8.6 (only ARE or Advanced Regular Expressions) |
| POSIX | Henry Spencer’s regex library used in many POSIX systems |
| GNU | GNU’s regex library which adds a few extensions to the POSIX syntax |
| Oracle | 11g, 12c, 18c, 21c |
| XML | 1.0–1.1 (as implemented by Saxon 10–12) |
| XPath | 2.0–3.1 (as implemented by Saxon 10–12) |
For JavaScript, some features are indicated with “with /u” or “without /u”. That means the feature is only supported when the regex is constructed either with the /u flag or without the /u flag. You’ll mainly see “with /u” in the Unicode reference because enabling better Unicode support is the main purpose of /u. But this flag also cleans up JavaScript’s regex syntax in certain areas. In particular, you’ll see this flag mentioned in the character reference as it affects escape rules.
For the .NET flavor, some features are indicated with “ECMA” or “non-ECMA”. That means the feature is only supported when RegexOptions.ECMAScript is set or is not set. Features indicated with “non-ECMA Unicode” match ASCII characters when RegexOptions.ECMAScript is set and Unicode characters when RegexOptions.ECMAScript is not set. Versions 1.0 to 4.8 refer to the original .NET Framework. The tables do not cover .NET Core 1.0 to 3.1, which are (nearly) identical to .NET 4.0 in their regex support.
For the RE2 flavor, some features are indicated with “default” or “POSIX”. That means that feature depends on whether the RE2::POSIX option is passed to the RE2 constructor. The option is not set by default.
For the PCRE2 flavor, some replacement string features are indicated with “extended”. This means the feature is only supported when you pass PCRE2_SUBSTITUTE_EXTENDED to pcre2_substitute.
For the std::regex and boost::regex flavors there are additional indicators ECMA, basic, extended, grep, egrep, and awk. When one or more of these appear, that means that the feature is only supported if you specify one of these grammars when compiling your regular expression. Features with Unicode indicators match Unicode characters when using std::wregex or boost::wregex on wide character strings. In the replacement string reference, the additional indicators are sed and default. When either one appears, the feature is only supported when you either pass or don’t pass match_flag_type::format_sed to regex_replace(). For boost, there is one more replacement indicator “all” that indicates the feature is only supported when you pass match_flag_type::format_all to regex_replace().
For the POSIX and GNU flavors, features indicated with “extended” are only available if you pass the flag REG_EXTENDED to regcomp(). Features indicated with “basic” are only available if you do not set REG_EXTENDED.
| Quick Start | Tutorial | Search & Replace | Tools & Languages | Examples | Reference |
| Introduction | Table of Contents | Quick Reference | Characters | Basic Features | Character Classes | Shorthands | Anchors | Word Boundaries | Quantifiers | Capturing Groups & Backreferences | Named Groups & Backreferences | Special Groups | Unicode Characters and Properties | Unicode Versions | Unicode Categories | Unicode Scripts | Unicode Blocks | Unicode Binary Properties | Unicode Property Sets | Unicode Boundaries | Mode Modifiers | Recursion & Balancing Groups | Backtracking Control Verbs |
| Characters | Matched Text & Backreferences | Case Conversion | Context | Conditionals |
Page URL: https://www.regular-expressions.info/reference.html
Page last updated: 12 September 2025
Site last updated: 29 October 2025
Copyright © 2003-2025 Jan Goyvaerts. All rights reserved.