Browser-onlyNo upload
Regular Expression Tester
Test JavaScript regular expressions and review matches instantly.
About the Regular Expression Tester
The Regular Expression Tester runs a JavaScript regular expression against your text and lists every match together with its capture groups. Flags such as g (global), i (ignore case), m (multiline) and s (dot matches newline) are supported.
Everything runs in your browser with JavaScript. Nothing you type is uploaded to our server, so it is safe to use with private data.
How to use it
- Enter the pattern without surrounding slashes.
- Add flags if needed.
- Paste the text to search.
- Select Find matches and review the results.
Common uses
- Building a pattern to validate input such as postcodes or IDs.
- Extracting values from log lines.
- Testing a search-and-replace pattern before running it on real files.
Tips
- Escape special characters such as . * + ? ( ) [ ] with a backslash to match them literally.
- Other languages use slightly different regex rules, so retest patterns written for Python or PHP.