Regex tester.

Write a regular expression, see every match highlighted as you type, inspect capture groups and preview replacements. Slow patterns are stopped automatically.

Runs in your browser. Nothing you enter is sent to KRA Digital or anyone else.

Matches highlighted

Match details

    More developer tools · All 55 free tools

    How to use it

    1. Type a pattern without the surrounding slashes, or pick a common pattern to start from.
    2. Choose flags: g finds every match, i ignores case, m makes ^ and $ work per line.
    3. Paste the text to test. Matches are highlighted and listed with their capture groups.
    4. Optionally enter a replacement using $1, $2 or $<name> to preview the result.

    Questions

    Which regex flavour does this use?

    JavaScript (ECMAScript) regular expressions, as used in browsers and Node.js. Most syntax also works in other languages, but lookbehind, named groups and flags vary between engines.

    Why was my pattern stopped?

    Some patterns, such as nested quantifiers like (a+)+, can take exponential time on certain text. The tester runs patterns in a background worker and stops them after 1.5 seconds.

    Should I validate email addresses with a regex?

    Only loosely. A simple check for something@something.tld catches typos; the only reliable test is sending a confirmation email.

    Is my text saved?

    The pattern and test text are kept in this browser’s local storage so they survive a refresh. Nothing is sent anywhere.

    Let’s build something great.

    Tell us what you want to build, who it is for and what it needs to do. We’ll help you define a practical next step.

    Start a project