Skip to contentSellstamp

Regex tester

Test a JavaScript regular expression against your text and see every match with its position and groups. Runaway patterns are stopped after two seconds.

g i m s u y d v

Stays on your device

Everything runs in your browser. Nothing you type is sent to Sellstamp or anyone else.

Building something to sell?

Sellstamp has a storefront, a checkout into your own payment account, automatic delivery and an API with webhooks. Open a free store

How to use it

  1. Type the pattern and the flags (g for all matches).
  2. Paste the test text.
  3. Read each match, its position and its captured groups.

Nothing you paste leaves this page

The conversion runs in this browser tab. Nothing is sent to Sellstamp or anyone else, which matters for configuration files, customer exports and tokens.

JavaScript flavour

Patterns use the regular expression engine built into your browser (ECMAScript), with flags g, i, m, s, u, y, d and v. Named groups show by name. Other flavours (PCRE, Python, .NET) differ in details such as lookbehind and possessive quantifiers.

Each test runs in a background thread with a two-second budget, so a pattern that backtracks catastrophically is stopped with a message instead of freezing the page.

Questions

Why do I only see one match?

Add the g flag to find every match.

Is this the same as regex in Python or PHP?

Mostly, but not exactly. This tests the JavaScript flavour; check features like lookbehind in your language’s documentation.

Why was my pattern stopped?

It took over two seconds, usually from nested quantifiers like (a+)+ meeting text they almost match.

How many matches are shown?

Up to 500 are counted and the first 100 are listed.