Write and test regular expressions with real-time match highlighting, group capture display, and instant feedback. Supports all standard JavaScript regex flags.
Click any pattern to load it into the tester.
A regular expression (regex) is a sequence of characters that defines a search pattern. They're used in virtually every programming language for searching, validating, and transforming text — from email validation to log parsing to find-and-replace.
g (global) — find all matches, not just the first. i (case-insensitive) — treat uppercase and lowercase as equal. m (multiline) — ^ and $ match start/end of each line, not just the whole string. s (dotAll) — makes . match newlines too.
This is usually a greedy quantifier issue. By default, * and + match as many characters as possible. Add a ? after them (.*? or .+?) to make them lazy — they'll match as few characters as possible.
Escape it with a backslash: \. matches a literal dot, \[ matches a literal opening bracket. Unescaped dots match any character.
No. All regex processing runs locally in your browser using the JavaScript RegExp engine. Nothing is sent to a server.