Choose a regex engine
Choose the flavor that matches your application before you refine a pattern. Similar syntax can produce different results in different engines.
- Free
- Included
- Pro
- Included
- Self-hosted
- Included
Match the target runtime
| Application or syntax family | Flavor to start with |
|---|---|
| Modern PHP using PCRE2 | PCRE2 (PHP) |
| Browser JavaScript or Node.js | JavaScript |
Python re | Python |
Go regexp | Golang |
Java java.util.regex | Java |
| .NET regular expressions | .NET 10.0 (C#) |
Rust regex | Rust |
| POSIX extended expressions | POSIX ERE |
| POSIX basic expressions | POSIX BRE (grep/sed) |
| An application using the older PCRE library | PCRE (Legacy) |
The JavaScript flavor uses the browser's JavaScript engine. A Node.js release can support a different set of features. Other flavors use the runtime builds supplied by regex101.
For a reproducible report, record the selected flavor, browser version, and target runtime version. A language name alone does not specify the exact library, Unicode tables, or operation.
Compare a named group
JavaScript names a capture group this way:
ORD-(?<id>[0-9]{4})
Python names the same group this way:
ORD-(?P<id>[0-9]{4})
Both examples capture 0042 from ORD-0042 in their corresponding runtimes.
Python rejects the JavaScript form. JavaScript rejects the Python form.
Matching, substitution, and parsing
The editor provides matching and substitution workers for its listed flavors. Replacement tokens still differ by engine. A valid matching pattern does not guarantee that a replacement expression is valid.
The commercial parser recognizes syntax and provides structured tokens. The parser analyzes syntax without executing a match. Formatting and debugging have their own supported scope.
Investigate a difference
- Verify that the flavor matches the target library.
- Copy the exact flags and input characters.
- Compare the same operation in both places.
- Reduce the example to one unexpected match or error.
- Run that example in the target runtime.
Lookbehind, Unicode character classes, backreferences, and replacement syntax are common sources of differences. The runtime mismatch guide provides a JavaScript reproduction and an escaping checklist.