Test regular expressions against sample text — free, no sign-up, nothing leaves your browser.
Regular expressions are built from a small set of symbols that combine in powerful ways. \d matches any digit, \w matches any letter, digit, or underscore, and \s matches whitespace — capitalize any of them (\D, \W, \S) to match the opposite instead. Quantifiers control repetition: + means "one or more," * means "zero or more," and {3} means "exactly three." So \d+ matches a run of one or more digits, while \d{3}-\d{4} matches something in the shape of a phone number's last two groups. Parentheses create a capture group, letting you pull out just the part of a match you actually want, separate from the surrounding text that had to be there to confirm the match.
g = global (find all matches, not just the first), i = case-insensitive, m = multiline (^ and $ match line boundaries), s = dotall (. also matches newlines). You can combine several, e.g. "gi".
The pattern isn't valid JavaScript regex syntax — common causes are an unclosed bracket, parenthesis, or an invalid escape sequence. The error message shown comes directly from your browser.
.* matches zero or more of any character, so it can match an empty string. .+ requires at least one character. Using .* where you meant .+ is a common source of unexpected empty matches.
Regex quantifiers are "greedy" by default — .* will grab as much text as possible while still allowing the rest of the pattern to match, which can span much further than intended. Adding a ? after a quantifier (like .*?) makes it "lazy," matching as little as possible instead.
No. Matching happens entirely locally in your browser — nothing you enter is sent to a server.