— Regex Tester

Free Online Regular Expression Tester

Quick Tips

  • This tool runs entirely in your browser - your data stays private.
  • Press Ctrl+V (Cmd+V on Mac) to quickly paste text.
  • Use the Copy button to save your result to clipboard.
  • Bookmark this page for quick access!

Test and debug regular expressions with live matching.

Examples

Input
Pattern: \d+
Text: Order 12345 shipped
Output
Match: 12345
Input
Pattern: [a-z]+@[a-z]+\.[a-z]+
Text: contact@example.com
Output
Match: contact@example.com
Input
Pattern: ^Hello
Text: Hello World
Output
Match: Hello
Input
Pattern: (\w+)@(\w+)
Text: user@domain
Output
Groups: user, domain

Frequently Asked Questions

Nearly all modern programming languages support regex including JavaScript, Python, Java, C#, PHP, Ruby, Go, and Perl. The syntax is largely similar across languages with some minor variations in features and escaping rules.

The global flag makes the regex engine find all matches in the text rather than stopping after the first match. Without it, only the first occurrence is matched.

Escape special characters with a backslash. To match a literal dot, use \. instead of just . which matches any character. Other special characters needing escaping include: * + ? [ ] ( ) { } ^ $ | \

The * quantifier matches zero or more occurrences (including no matches), while + requires at least one occurrence. For example, \d* matches empty strings, but \d+ requires at least one digit.

Yes, enable the multiline (m) flag to make ^ and $ match the start and end of each line, not just the entire string. The dotall (s) flag makes . match newlines for patterns spanning multiple lines.

Absolutely. All regex testing occurs locally in your browser. Your patterns and test text are never transmitted to any server, ensuring complete privacy for sensitive content.

Cookie Preferences

We use cookies to enhance your experience. By continuing to visit this site you agree to our use of cookies.

Cookie Preferences

Manage your cookie settings

Essential Cookies
Always Active

These cookies are necessary for the website to function and cannot be switched off. They are usually set in response to actions made by you such as setting your privacy preferences or logging in.

Functional Cookies

These cookies enable enhanced functionality and personalization, such as remembering your preferences, theme settings, and form data.

Analytics Cookies

These cookies allow us to count visits and traffic sources so we can measure and improve site performance. All data is aggregated and anonymous.

Google Analytics _ga, _gid

Learn more about our Cookie Policy