REGEX TESTER

Test regular expressions in real-time — with match highlighting, groups, and presets
/ /
Presets:
Test String
Replace
FREQUENTLY ASKED QUESTIONS
What are regex flags?
g = global (find all matches), i = case-insensitive, m = multiline (^ and $ match line boundaries), s = dotAll (. matches newlines), u = unicode support.
How do I match a literal special character?
Escape it with a backslash. To match a period, use \. — otherwise . matches any character. Special characters: . * + ? ^ $ { } [ ] | ( ) all need escaping.
What is a capture group?
Parentheses () create a capture group. The text matched inside them is available as $1, $2 etc. in replacements, and shown in the Matches panel above.
Why does my regex work in one language but not another?
Regex syntax varies slightly between languages. This tester uses JavaScript's regex engine. Python's re module and PCRE (PHP, Perl) have some different syntax — especially for lookbehinds and Unicode.

More dev tools — JSON Formatter, Base64, Hash Generator, Diff Checker.