Regex Tester

Test regular expressions live against your text. See matches highlighted instantly with a free online regex tester.

How to Use the Regex Tester

  1. Enter your regular expression in the pattern field.
  2. Toggle flags: g (all matches), i (ignore case), m (multiline), s (dot matches newline).
  3. Paste sample text to test against.
  4. Click Test Regex to see every match with its index.
  5. Optionally enter a replacement string and click Replace.

Common Regex Examples

  • Email: [\\w.+-]+@[\\w-]+\\.[\\w.]+
  • Date (YYYY-MM-DD): \\b\\d{4}-\\d{2}-\\d{2}\\b
  • URL: https?:\\/\\/[\\w.-]+(?:\\.[a-z]{2,})+
  • Phone number: \\+?[0-9]{1,3}?[-.\\s]?\\(?[0-9]{3}\\)?[-.\\s]?[0-9]{3}[-.\\s]?[0-9]{4}

More Free Developer Tools

Explore our full collection of fast, private, browser-based tools.

All Tools →