Hoglet

Regex tester

Every match is marked in the text as you type.

Matches

Matches show here, with what each group caught.

Type a pattern

Regex Tester: Test a Regular Expression, Private

Test a regular expression against text.

Type a regular expression and some text, and every match is marked in place as you type, with a list of the matches and what each numbered and named group caught; press one to find it in the text. The flags are the buttons after the pattern (g every match, i ignore capitals, m ^ and $ at each line, s dot takes line breaks; Alt and the letter in the pattern), and the chips under the text put the common pieces in for you. A mistake in the pattern is said in plain words. The flavour is JavaScript’s, the one browsers and Node use. Test data is often real data: log lines, emails, customer records. It stays on your device.

How to use Regex tester

  1. Type a regular expression in Pattern and paste your text in Text to test.
  2. Turn the flags g, i, m and s on or off with the buttons after the pattern.
  3. Read the matches, marked in the text and listed with their groups; press one to find it.

Regex tester: common questions

Is my test data uploaded when I use an online regex tester?

Not with this regex tester: the pattern and the text are matched in your browser, on your device, and neither is sent anywhere. Log lines, emails and customer records used as test data stay with you.

Which regex flavour does the regex tester use?

The regex tester uses JavaScript’s regular expressions, the flavour browsers and Node use, with the flags g, i, m, s and u. A pattern written for PCRE or Python may need changes where those flavours differ.

What happens if a regex like (a+)+ is too slow on my text?

A pattern that takes too long on the text, such as a repeat inside a repeat like (a+)+, is stopped instead of freezing the page, and the regex tester says so. Only the first 1,000 matches are listed.

Everything stays on your device. Nothing is uploaded. Works offline once your first visit has stored the app.