Your files

Each file stays available at its link for 48 hours and is then deleted from our server automatically. You can delete it earlier at any time.

No files yet. Files you convert appear here and stay available for 48 hours.

Regex Tester

Write a regular expression and see its matches highlighted live, with capture groups and a replace preview.

//g
Matches: 0

Test Regular Expressions Online

Type a regular expression and some test text, and every match is highlighted as you type. A table lists each match with its position and capture groups — numbered and named — so you can see exactly what your pattern captures. Turn on Replace to preview a substitution with $1, $<name> and other references.

The tester uses the JavaScript regular expression engine of your browser, with the g, i, m, s and u flags. Patterns that take too long are stopped automatically instead of freezing the page. Nothing you type is sent to a server.

Why Use This Regex Tester?

  • Live highlighting of all matches
  • Numbered and named capture groups for each match
  • Replace preview with group references
  • Slow patterns are stopped instead of freezing the page

How to Test a Regular Expression

  1. Enter your pattern without the surrounding slashes and choose the flags
  2. Paste the text to test it on
  3. Check the highlighted matches and groups, and optionally try a replacement

Frequently Asked Questions

Is this regex tester free?

Yes, it is completely free and has no limits.

Which regex syntax is used?

JavaScript (ECMAScript) regular expressions, as in your browser and Node.js. Most syntax is shared with PCRE, Python and .NET, but features like lookbehind or possessive quantifiers can differ between engines.

How do I use capture groups in the replacement?

Refer to numbered groups with $1, $2 and so on, to named groups — written (?<name>…) — with $<name>, and to the whole match with $&. Use $$ for a literal dollar sign.

Is my text sent to a server?

No. Matching runs entirely in your browser.

Related tools

TOP