All / Developer

Regex Tester

Test a JavaScript regular expression against sample text and list the matches.

The matches update as you edit the pattern and the sample. The engine is the browser's JavaScript RegExp.

  1. 1Enter a pattern.
  2. 2Paste the sample text.
  3. 3Read the matches.

42

About this tool

Try a JavaScript regular expression against sample text and list every match. Type the pattern, paste the sample, and read the hits.

  • A bad pattern shows the engine error
  • It doesn't run against files on disk
  • Flags are whatever you type in the pattern

Questions

Which engine?
The browser’s JavaScript RegExp.
What if the pattern is invalid?
The error message is shown and nothing is replaced.
Are flags supported?
The global flag is always on, so every match is listed. There is no box for other flags such as case-insensitive.

Ratings

No ratings yet. The average shows after 3 ratings.

Ratings come from people using this tool. Nobody is paid or rewarded for them, and written reviews are checked for spam before they appear, not for whether they are positive.

Related tools