Skip to content
install

tool · one of 51 free, no counter

Regex

What does this regular expression actually match?

Most regex testers are a web page that sends your pattern and your text somewhere, or runs an engine that is not the one your script will use. This runs in the browser's own JavaScript engine, so a pattern that works here works in the code it is going into - every match highlighted in place, each numbered and named group listed, and the replacement shown when you give one.

Reach it Press ⌘ + K on any tab and type regex. Ctrl + K on Windows and Linux

A pattern run over text, with every match, group and replacement
reads the pattern and text you type
writes nothing
sends nothing
engine the browser's own JavaScript
flags g, i, m, s, u, y
limits 500 matches, the first 20,000 characters
plan free
section#about

What this actually is

Writing a validation pattern, pulling values out of a log line, or finding out why a replace call is eating one character too many. Pasting real text beats a made-up example, and none of it leaves the panel.

section#asked

Asked about this tool

Why does it only run when I press Run?

Because a half-typed pattern such as (a+)+ is the one thing on the screen that can stall the tab. Running on every keystroke would run exactly those. A run you press is a run you meant.

Will a pattern that works here work in Python or PHP?

Often, not always. This is JavaScript's engine, and PCRE, Python and Go differ on lookbehind, named group syntax and some flags. For a script in the browser or in Node, what matches here is what will match there.

Is my text sent anywhere?

No. Nothing is read from the page, nothing is stored, and nothing is requested. Close the panel and the pattern is gone.

how to use regex

  1. Open Regex and type the pattern, then toggle the flags it needs.
  2. Paste the text to match into the box underneath.
  3. Press Run and read every match, with each numbered and named group listed.
  4. Add a replacement, using $1 or $<name>, to see the rewritten text.