Skip to main content

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
Compare plans

Match the target runtime​

Application or syntax familyFlavor to start with
Modern PHP using PCRE2PCRE2 (PHP)
Browser JavaScript or Node.jsJavaScript
Python rePython
Go regexpGolang
Java java.util.regexJava
.NET regular expressions.NET 10.0 (C#)
Rust regexRust
POSIX extended expressionsPOSIX ERE
POSIX basic expressionsPOSIX BRE (grep/sed)
An application using the older PCRE libraryPCRE (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​

  1. Verify that the flavor matches the target library.
  2. Copy the exact flags and input characters.
  3. Compare the same operation in both places.
  4. Reduce the example to one unexpected match or error.
  5. 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.

Select the runtime that matches your application before testing a pattern.
The flavor selector lists the available regex engines.