UTILITYCO

Regex Tester

Test regular expressions against your text live in the browser. Toggle flags, highlight every match and capture group, and browse a handy pattern cheatsheet.

Tool / developer / regex-tester

Loading tool...

01 / How it works

How it works

  1. 01Enter your regular expression and toggle the flags you need.
  2. 02Paste the text you want to test against.
  3. 03See matches highlighted live with capture groups in a table.
  4. 04Use the cheatsheet as a reference for common tokens.

02 / FAQ

Frequently asked questions

Which regex flavour is used?

It uses the JavaScript regular-expression engine built into your browser, so patterns behave exactly as they would in JavaScript, Node.js and TypeScript code.

Which flags can I enable?

You can toggle global, case-insensitive, multiline, dotall, unicode and sticky flags. The tool builds the pattern with your chosen flags and updates the matches immediately.

How are matches shown?

Every match is highlighted directly in your test text, and a table lists each match with its position and any capture groups, so you can confirm your pattern extracts the right parts.

Is my test text private?

Yes. Matching runs entirely in your browser. Neither your pattern nor your sample text is uploaded, so you can safely test against real log lines or data.

What if my pattern is invalid?

If the expression cannot compile, for example an unbalanced bracket, the tool shows the engine's error message inline and simply stops highlighting until you fix it.