Skip to main content

Performance and Reliability

Built for live editing

regex101 runs the parser during live editing. An uncached call parses the full input in linear time (O(n)). The parser does not maintain an incremental syntax tree.

Both parser functions memoize repeated calls with the same input and options object.

Parse time depends on the flavor, pattern length, nesting, and the syntax that requires validation. Measure representative patterns in the target browser or Node.js runtime.

Test coverage

  • Nearly 4,000 automated tests
  • More than 95% statement and line coverage
  • Valid and invalid cases for all ten flavors
  • Pattern and substitution parser coverage
  • Regression cases for Unicode, references, lookbehinds, character classes, and quantifiers

Validation model

Tests use the published syntax rules for each regex flavor. Flavor-specific token variants apply the differences between engines.

The parser returns typed error tokens and a patternError status. It continues to return the partial token tree after most syntax errors.

The parser does not compile or run the pattern. Use the target regex engine to confirm runtime matching behavior.