Regex Tester Online

Write a regular expression, paste a test string, and instantly see every match highlighted. Supports JavaScript regex with all standard flags.

Samples:
Regular Expression
/ /g
Enter a pattern above
Test String

How to Use the Online Regex Tester

Type your regular expression in the pattern field, choose your flags, then paste the string you want to test. Matches are highlighted in real time — the first match in blue and subsequent matches in yellow.

What Are Regex Flags?

  • gGlobal: find all matches, not just the first one
  • iCase insensitive: hello matches Hello, HELLO, etc.
  • mMultiline: ^ and $ match start/end of each line
  • sDotall: . matches newline characters too

Common Regex Patterns

  • Email address: [\w.+-]+@[\w-]+\.[a-zA-Z]{2,}
  • URL: https?://[^\s]+
  • Phone number: \+?[\d\s\-().]{7,}
  • IP address: \b\d{1,3}(\.\d{1,3}){3}\b
  • Date (YYYY-MM-DD): \d{4}-\d{2}-\d{2}
  • Hex color: #[0-9a-fA-F]{3,6}\b

About This Tool

This regex tester runs entirely in your browser using JavaScript's native RegExp engine. No data is sent to any server. The JavaScript regex syntax is compatible with most modern programming languages including Python (re module), Java, and Go for common patterns.

Related Developer Tools

Looking for other free tools? Try the Unix Timestamp Converter to decode epoch values in API responses, the UUID Generator for unique identifiers, or the Hash Generator for MD5 and SHA checksums.