๐Ÿ”

Regex Tester

Test regular expressions with live highlighting and match results. Free online regex tester.

Free Developer
/ /
Enter a pattern to test

Regex Quick Reference

PatternDescription
.Any character (except newline)
\dDigit [0-9]
\wWord character [a-zA-Z0-9_]
\sWhitespace
[abc]Any of a, b, or c
[^abc]Not a, b, or c
^Start of string
$End of string
*0 or more
+1 or more
?0 or 1
{n}Exactly n times
{n,m}Between n and m times
()Capture group
(?:)Non-capture group
|Or
\bWord boundary

Frequently Asked Questions

What is a regular expression?

A regular expression (regex or regexp) is a sequence of characters that defines a search pattern. It's used for pattern matching within strings, such as finding email addresses, validating phone numbers, or replacing text. Regex is supported in virtually all programming languages.

What do the regex flags mean?

g (global) finds all matches, not just the first. i (case-insensitive) makes matching case-insensitive. m (multiline) makes ^ and $ match line boundaries. s (dotAll) allows . to match newlines. u (unicode) enables full unicode matching. y (sticky) matches only from lastIndex.

Why is my regex not matching?

Common issues: 1) Forgetting the global flag when you want all matches. 2) Special characters like . * + ? [ ] ( ) { } | ^ $ \ need to be escaped with a backslash. 3) The pattern might be correct but the test string doesn't contain a match. Check the status message for error details.

Does this tool support all regex features?

This tool uses JavaScript's native RegExp engine, which supports most PCRE features. Some advanced features like lookbehind assertions may not work in older browsers. Named capture groups (?<name>) are supported in modern browsers.

Is this tool free?

Yes, completely free with no sign-up required. All regex matching happens in your browser.