Regex Cheatsheet & Tester

Interactive regex cheatsheet for JavaScript. Test patterns from the cheatsheet directly against your own strings.

//g

Common Use Cases

  1. 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.
  2. 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.
  3. 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