PDF Toolkit

Regex Tester

Test regular expressions with live highlighting.

Runs in your browser. Your file is never uploaded.

Flags

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

How to use Regex Tester

  1. 1Enter a pattern and choose flags.
  2. 2Type or paste test text; matches highlight as you type.
  3. 3See each group in the table, and try a replacement.

Questions

Which regex flavour is this?

JavaScript's, as used by browsers and Node.js. It supports named groups (?<name>...), lookbehind, and the u and s flags.

What happens with a slow pattern?

Patterns run in a background thread. If one takes more than two seconds (usually catastrophic backtracking, as with (a+)+ on long text), it's stopped and you're told, instead of the page freezing.

Are my files uploaded anywhere?

No. The tool runs as code in your browser tab and processes the file on your own device. Nothing is sent to a server, and the site's security policy blocks the page from sending data to any other website. You can check: open your browser's developer tools, watch the Network tab while the tool runs, and you'll see no upload.