
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.
- 1Enter a pattern.
- 2Paste the sample text.
- 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
JSON formatterPretty-print JSON with a two-space indent, and show the parse error when the text is invalid.
CSV and JSONConvert a CSV table to JSON, or a JSON table to CSV, keeping commas that sit inside quotes.
Base64Encode text or a file up to 8 MB into Base64, or decode Base64 text back into text.
URL encode and decodeEncode text as a URL query value, or decode percent-escapes back into text.
JWT decoderRead the header, payload, and expiration time of a JSON Web Token.
UUID v4 GeneratorGenerate one version-4 UUID from the browser's random source.
Cron explainerExplain a five-field cron expression and list the next five run times on this device.
Unix timestampTurn a Unix timestamp into the local date and time.