Regex Cheatsheet & Tester
Interactive regex cheatsheet for JavaScript. Test patterns from the cheatsheet directly against your own strings.
//g
Common Use Cases
- Matching email addressesTest the pattern [\w.+-]+@[\w-]+\.[\w.-]+ against a list of email addresses and non-emails to validate your regex before using it in production code.
- Extracting numbers from textUse \d+ or -?\d+\.?\d* to extract integers and decimals from a text string. Test against mixed strings to confirm all number formats are captured.
- Validating date formatsTest \d{4}-\d{2}-\d{2} against a set of date strings (both valid and invalid) to verify that your ISO 8601 date validation regex works correctly.
Pro plan — coming soon
Save your history, create reusable presets, and share outputs with a link. One plan, all tools.
See what's planned →Frequently Asked Questions
Related Tools
Data Format Converter
Convert between JSON, YAML, TOML, CSV, XML, and SQL. Auto-validates input and prettifies with one click.
Diff Viewer
Paste two blocks of text to instantly see a visual unified diff with additions, deletions, and a copyable raw patch.
JSON Schema Generator + Validator
Paste sample JSON to instantly generate a draft-07 JSON Schema. Switch to Validate mode to check any JSON against a schema. Runs entirely in your browser.