Orbitautil
Local JS regex lab

Regex Tester

Build and debug JavaScript regular expressions locally in your browser. Highlight matches, inspect named capture groups and indices, preview replacements, run pass/fail test cases and share a reproducible link without uploading your text.

How it works

  1. Type a JavaScript regular expression and flags.
  2. Paste representative text or load an example.
  3. Inspect matches, named groups, indices, replacement output and test cases instantly.
Executed in 0ms
🎯 0 matches
JavaScript RegExp, local in your browser
/ /

Replace

 

List output

 

Tests

Results

No matches found.

Explain

Examples

Regex Cheat Sheet
  • . Any character (except newline)
  • \w Word character
  • \d Digit
  • \s Whitespace
  • [A-Z] Character class (A to Z)
  • [^A-Z] Negated class
  • (abc) Capture group
  • (?:abc) Non-capturing group
  • * 0 or more
  • + 1 or more
  • ? 0 or 1
  • 4 Between 2 and 4
  • ^ Start of string/line
  • $ End of string/line
  • \b Word boundary

Local JavaScript engine

Patterns run with the same browser RegExp engine used by modern JavaScript environments, with no server round trip for your sample text.

Capture groups and indices

Matches list numbered captures, named captures and index ranges when the d flag is supported by the browser.

Replacement and tests

Preview replacement output, generate a custom list from matches and keep small pass/fail cases beside the pattern.

Common use cases

  • Debugging JavaScript and Node.js regex patterns.
  • Validating data extraction rules before coding.
  • Previewing replace operations safely.
  • Documenting edge cases with pass/fail tests.

Limitations

  • Uses the browser's JavaScript RegExp engine, not PCRE, Python or .NET.
  • Browser support determines newer flags such as d and v.
  • Extremely large texts or pathological patterns may slow down the visual highlighter.

Frequently asked questions

Are my data or strings uploaded?

No. The regex processing happens entirely locally on your device.

What Regex engine is used?

It uses JavaScript RegExp. It's perfect for testing expressions that will run in Node.js or web environments.

Does it support named capture groups?

Yes. Named groups are shown separately when the browser supports them.

Can I share a test case?

Yes. The page can copy a link containing the pattern, flags, sample text and output templates.

Does it work with lookahead and lookbehind?

Yes. JavaScript supports positive and negative lookahead and lookbehind assertions in modern browsers.

Can I test multiline patterns?

Yes. Use the m flag to make ^ and $ match line boundaries instead of the full string.

Related English tools