Write a pattern and see every match highlighted in your test string as you type, with capture groups, named groups and flags broken out clearly.
Written as you would write it between slashes — no quoting, no escaping for a string literal.
Waiting for a pattern
Matching uses your browser's own regular expression engine — the same one your code will run.
Write a pattern
Every match is highlighted live, with positions and capture groups broken out.
Regex Tester runs entirely on your device — the pattern is never executed as code, only compiled as a regular expression.
You’re on the Free plan. Compare plans
A regular expression is a small pattern language for describing shapes in text: an email address, a date, a log line, a field you need to pull out of a thousand others. Writing one is quick; being sure it does what you meant is not, because a pattern that looks right will still quietly match one character too many or skip the case you care about.
This tester answers that question by showing you the answer rather than describing it. Every match is highlighted in your test string as you type, each one is listed with the exact positions it spans, and every capture group — numbered or named — is broken out with the text it captured, including the groups that did not participate in a match at all.
Matching is done by your browser's own RegExp engine, which is the same engine your JavaScript will run. There is no server, no reimplementation and no dialect translation, so a pattern that behaves a certain way here behaves that way in your code. Patterns from other languages may differ: PCRE, Python and Go each have features JavaScript does not.
The pattern is only ever compiled as a regular expression. It is never evaluated as JavaScript, which is the one genuinely dangerous thing a tool like this could do with what you type.
JavaScript's, exactly as implemented by your browser. That means lookbehind, named groups and Unicode property escapes are available, while features specific to PCRE, Python or Go — recursion, possessive quantifiers, conditionals — are not.
Without the g flag a regular expression stops at the first match by design. Turn on g to scan the whole string. The status line says which mode you are in.
Parentheses capture the part of the match they surround, numbered from 1 in the order the opening brackets appear. Write (?<name>…) to name one instead, and the name is shown beside the captured text. Use (?:…) to group without capturing.
A pattern cannot execute code, but some patterns — typically a quantifier inside a quantified group, such as (a+)+ — take exponential time on certain inputs, and a single match like that cannot be interrupted once it starts. Matching therefore runs on a separate thread, which is stopped after about a second: a catastrophic pattern costs you a message explaining what happened rather than a frozen tab. The test string and the number of matches are capped as well.
No. The pattern and the text stay in your browser. Nothing is uploaded, logged or stored, which is what makes it safe to test against a real log excerpt.
Up to 5,000, and up to 1,000 of them are highlighted. Beyond that the count is marked with a plus and the remaining text is left unhighlighted rather than freezing the page.