OpenGPT.in

Regex Tester

Test regular expressions against your text, live.

Runs in your browser Runs entirely in your browser. Nothing you put in it ever leaves your device.

Flags

Enter a pattern to start matching.

Matches

0 found

Use $1, $2 for capture groups, or $<name> for named groups.

Capture groups

No matches yet.

Was this useful?


About this tool

Type a pattern and see every match highlighted as you go, with capture groups and named groups listed per match. There is also a replace preview, so you can check a substitution before running it for real.

How to use it

  1. Enter a pattern and pick your flags.
  2. Paste the text you want to search.
  3. Read the highlighted matches and the group table below.
  4. Optionally enter a replacement to preview the result.

Supported input

  • JavaScript (ECMAScript) regular expressions

Privacy

Runs entirely in your browser. Nothing you put in it ever leaves your device. Everything happens in JavaScript on this page, so the tool keeps working even if you go offline after it has loaded — which is the simplest way to see for yourself that nothing is being sent. Read the full privacy information.

Questions

Which regex flavour is this?

JavaScript’s, because the matching is done by your browser’s own engine. It is close to PCRE for everyday patterns, but lookbehind support and some Unicode escapes differ from PHP or Python.

Can a pattern hang the page?

A catastrophically backtracking pattern can be slow. Matching runs against a bounded slice of your text and stops after a match limit, so the page stays usable — you will see a warning instead of a freeze.

Is my text sent anywhere?

No. The pattern and the text stay in your browser.