Developer

Regex Tester

Test JavaScript regular expressions in the browser. Shows matches, capture groups and supports replace preview.

Matches



          

Replace preview


        

FAQ

Regex Tester FAQ

What regex flavor does this tester use?

It uses native JavaScript regular expression syntax via the RegExp object, so any flags you enter (g, i, m, s, u, y) behave exactly as they would in browser JavaScript.

Does it show capture groups?

Yes. Each match is listed with its index and every capture group ($0 for the full match, $1, $2, and so on), and with the global flag it lists every match found in the string.

Can I preview a replacement before using it?

Yes. Enter a replacement pattern (using $1, $2 to reference capture groups) and click "Preview Replace" to see the result without altering your original test string.