Regex Tester

Try a regular expression on your text as you type and see every match highlighted. Each match lists its position and capture groups, and a replacement like $1 shows the result before you ship it. Runaway patterns are stopped after one second so the browser never freezes.

Regular expression

Result

 
    About this tool

    How to use it

    1. 1 Type the pattern. Leave out the surrounding slashes.
    2. 2 Tick the flags you need (g, i, m, s, u) and paste the text to test.
    3. 3 Check the highlighted matches and groups, and type a replacement to preview it.

    Good to know

    • The page audit reads HTML you paste — use the Link checker to follow a link
    • YAML support covers the widely used syntax only
    • JWT decoding unpacks the contents; it does not verify the signature

    Frequently asked questions

    Which regex flavor is this?

    JavaScript (ECMAScript). Syntax JavaScript lacks, like possessive quantifiers (a++) or atomic groups, shows an error.

    It says the pattern didn't finish within a second.

    Nested repetition like (a+)+ blows up on slightly longer input. Rewrite it so the repeats don't overlap.

    How do I use groups in the replacement?

    Use $1, $2 for numbered groups, $<name> for named groups and $& for the whole match.

    Esc