Developer Tools
Regular expression tester
Test a JavaScript regular expression against text and inspect its matches.
JavaScript is required to run the interactive tool. Open the tool separately if it does not load in the frame.
How to use it
Enter sample text, a pattern without surrounding slashes, and any flags. Press Run to see up to 100 matches.
Example
The pattern cat matches the letters cat, including inside words such as scatter.
Frequently asked question
Can a complex regex freeze the page?
It runs in a disposable Worker with a three-second limit and a Cancel button.
Limits and privacy
Text is limited to 100,000 characters and patterns to 1,000. The Worker is terminated after three seconds; a timeout means the expression was not completed.
Tool input is processed in a separate browser environment without advertising or analytics scripts. This page does not upload it to the service.