Regex Pattern Feature Comparison

Introduction

This is a high-level feature comparison of the regex language features supported by specRegex.

For a more detailed feature comparison (such as the set of supported syntax for each feature), see the detailed comparison chart.

Basics

Feature specRegex .NET std::regex PCRE2 RE2
Standard character escapes
Hexadecimal escapes
Control character escapes
Octal escapes
Dot
Alternation
Character classes
Character class ranges
Ranges with escapes
Negated character classes
Character class subtraction ✔ (Opt)
Character class intersection
POSIX classes
Shorthand character classes

Anchors

Feature specRegex .NET std::regex PCRE2 RE2
String anchors
Word boundaries ✔ (Opt) ✔ (Opt) ✔ (Opt)

Quantifiers

Feature specRegex .NET std::regex PCRE2 RE2
Greedy quantifiers
Lazy quantifiers ✔ (Opt)
Possessive quantifiers
Greedy variable quantifier
Lazy variable quantifier
Possessive variable quantifier

Unicode

Feature specRegex .NET std::regex PCRE2 RE2
Grapheme
Hexadecimal code point escapes ✔ (Opt)
Unicode categorires
Unicode script
Unicode block

Groups

Feature specRegex .NET std::regex PCRE2 RE2
Numeric capture group
Named capture group
Numeric backreference
Named backreference
Comment
Branch reset group
Atomic group
Lookaheads ✔ (Opt)
Lookbehinds

Mode Modifiers

Feature specRegex .NET std::regex PCRE2 RE2
Mode modifier groups
Reset modifiers (?^)
Case insensitive (?i)
Free spacing (?x)
Freer spacing (?xx)
Tight spacing (?t)
Single line (?s)
Multi line (?m)
Explicit capture (?n)
Duplicate named groups (?J)
Ungreedy quantifiers (?U)
UNIX lines (?d)
Literal mode (?q)