Regex tester
Type a regular expression and some text to see matches highlighted instantly, with capture groups and a replace preview — JavaScript regex syntax, free.
How to test a regex
- Type the pattern in "Pattern" and turn on the flags you need (g, i, m, s, u).
- Paste the text to test on the left; matches are highlighted on the right as you type.
- Check every match with its groups; turn on "Replace" to try a replacement with $1, $2…
Frequently asked questions
JavaScript's — the same as /…/ in JavaScript or TypeScript code, including named groups, look-behind and \p{…} with the u flag.
g: find every match, not just the first; i: ignore case; m: ^ and $ match at each line; s: dot also matches line breaks; u: handle Unicode characters such as emoji properly.
Use $1, $2… to insert groups in order and $& for the whole match. For example, turn 2026-10-15 into 15/10/2026 with the pattern (\d{4})-(\d{2})-(\d{2}) and $3/$2/$1.
Some patterns such as (a+)+b can backtrack for a very long time on long text. The tool stops after 1.5 seconds so the page never freezes — tighten the pattern.
Yes, completely free, with no sign-up.
Related tools
Regex generatorReady-made regex for email, phone, dates and moreRegex explainerUnderstand every part of a regexCron expression generatorPick a schedule, get the cron expressionCron expression parserRead a cron expression and see when it runsJWT decoderRead a JWT's header, payload, expiry and check its signatureJWT generatorSign a JWT with a secret or a private keyMarkdown previewType Markdown, preview it live and get the HTMLHTML to MarkdownTurn HTML or copied content into MarkdownUnix timestamp converterTimestamp ⇄ date, with the current epoch time