Command Palette

Search for a command to run...

Book a call

A regex tester that tells you it won't work in Go before production does

You write a regex in JavaScript, it works, you paste it into a Go service and it doesn't compile. My free regex tester runs your pattern live, explains it token by token in plain English, warns you about patterns that can freeze a server and checks the same pattern against Python, Go, Java, Rust and PHP at once, with a rewrite and ready-to-paste code for each.

regexdeveloper-toolsfree-toolsjavascriptpythongolang
One line branching into six paths, two of them marked with a cross

Regular expressions are the only language I write that I can't read the next morning. And the worst regex bugs I've shipped came from a pattern that was right in one language and wrong in another.

Lookbehind works in JavaScript and Python, Go's engine doesn't have it, and Rust's regex crate doesn't either. Named groups are (?<name>) in one place and (?P<name>) in another. \d matches Arabic-Indic digits in some engines and only 0 to 9 in others. You find out in CI, or worse, you don't.

So I built a regex tester that checks portability while you type.

Credit where due: regex101 is excellent and I've used it for years. Here's where each one fits.

TesterGood forWatch out forHonest assessment
regex101Running a pattern on a chosen flavour's real engine, step debugger, explanationsOne flavour at a timeThe gold standard for "does this exact engine match this text?"
RegExrLearning, a clean cheat sheet, community patternsFewer flavoursLovely for learning regex.
Your IDE's find boxQuick searches in filesNo explanation, no portability infoFine until you need to know why.
Sidd's regex testerChecking one pattern across six languages at once, ReDoS warnings, code outputMatches run on JavaScript's engine; other languages are checked, not executedFor when you write the pattern once and ship it in three services.

What does "works in every language" actually mean?

The Languages tab takes your pattern and checks it against the known differences of each engine. Every issue lands in one of three buckets:

LevelMeaningExample
UnsupportedThe engine can't run this at allLookbehind or backreferences in Go and Rust
RewriteIt works with different syntax, and the tool writes itNamed groups become (?P<name>...) for Python
BehaviourIt runs, but means something slightly different\d and \w matching Unicode digits and letters in some engines

Each language gets a status (works, needs changes or unsupported), the rewritten pattern and the exact part of your pattern each issue is about, highlighted. The rules were checked against each engine's docs (and against a real Python 3.13 run) in October 2026.

flowchart LR
    P["A price regex with a lookbehind"] --> JS[JavaScript ✓]
    P --> PY[Python ✓ if the lookbehind is fixed width]
    P --> JV[Java ✓]
    P --> PHP[PHP ✓]
    P --> GO[Go ✗ no lookbehind]
    P --> RS[Rust ✗ no lookbehind]

Can it generate regex code for my language?

Yes. For each language that can run the pattern, it writes copy-ready code: the pattern as that language's string literal (escaped properly, which is half the battle in Java and PHP), the right flags and, if you're doing a replace, the replacement converted to that language's syntax. $1 and $<name> in JavaScript become whatever Python, Go, Java, Rust or PHP expects. If a replacement can't be written in a language, it tells you why instead of producing something broken.

What is catastrophic backtracking, and how does it catch it?

A tangled knot of line next to a calm straight line

Some patterns take exponentially longer on certain inputs. The classic is something like (a+)+$ against a long string of as followed by a b. One bad pattern in a request handler and a single crafted input can pin a CPU. This is called ReDoS (regular expression denial of service), and it has taken down real production sites.

The tester protects you two ways:

  1. A static check. Before running anything, it analyses the pattern's structure and flags nested quantifiers and overlapping alternatives that can blow up, pointing at the exact part of the pattern responsible.
  2. A hard time limit. Matching runs in a Web Worker. If a run takes longer than a second, the worker is killed and replaced, so your tab never freezes, and the tool tells you that this pattern on this text is a problem.
text
⚠ Catastrophic backtracking
  (\w+\s?)+$
   ^^^^^^^^
  The inner \w+ can match the same text as the outer repeat,
  so a failing input splits in exponentially many ways.

Does it explain what my regex does?

Every token gets a row in plain English, nested to match your groups: "the text 'https'", "optionally the character s", "capture group 1: one or more digits", and so on. Hover a row to highlight that part of the pattern. It's the thing I wish I'd had the morning after writing a regex.

What else is in there?

  • Live matching with every match and capture group highlighted as you type, up to 5,000 matches.
  • Flags g, i, m, s, u, y and the newer v (Unicode sets), each with a tooltip saying what it does.
  • Replace mode with a live preview of the replaced text.
  • Share links that carry the pattern, flags, test text and replacement in the URL fragment (after the #), which never reaches a server.
  • Nothing uploaded. The match runs on your browser's own regex engine.

FAQ

What is the best online regex tester?

For running a pattern on one specific engine, regex101. For checking a pattern across JavaScript, Python, Go, Java, Rust and PHP at the same time, with ReDoS warnings and generated code, my regex tester.

Why does my regex work in JavaScript but not in Go?

Go's regexp package uses RE2, which has no lookahead, lookbehind or backreferences. The Languages tab lists exactly which part of your pattern Go can't run.

Does Python support lookbehind?

Yes, but Python's re module needs a fixed-width lookbehind, so (?<=a+) fails there while JavaScript accepts it. The tester flags this.

How do I write named groups in Python vs JavaScript?

JavaScript uses (?<name>...) and Python uses (?P<name>...), with named backreferences written (?P=name). The Languages tab rewrites both for you, and renames groups whose names a language won't accept (Java, for example, doesn't allow underscores).

What is ReDoS?

Regular expression denial of service: an input that makes a vulnerable pattern backtrack for seconds or minutes. The tester flags risky patterns statically and stops any test that runs longer than a second.

Which regex engine does it use?

Your browser's JavaScript engine runs the matches. Python, Go, Java, Rust and PHP are checked against their documented differences, not executed.

Want to try it?

Open the regex tester, paste the scariest regex in your codebase and open the Languages tab. If it's all green, congratulations. If it isn't, at least you found out here. More free tools live next door, including a diff checker for when you're comparing two versions of the same regret.

Spotted an engine difference I missed? Email siddhant06137@gmail.com or message @creatorsidd on X. Need a developer tool like this built for your team? Book a 15-minute call.

Open for challenges.

Tell me what you're building, or grab a 15-minute call.

Command Palette

Search for a command to run...