searchDev Tool

Regex Tester

Write a regular expression, choose flags, and see matches highlighted in real time.

Regular Expression Pattern
/ /
gglobal
icase insensitive
mmultiline
sdot matches newline
uunicode
error
Test String
help_outlineRegex Quick Reference (click to insert)

Frequently Asked Questions

g (global) — find all matches, not just the first. i (case-insensitive) — ignore upper/lower case. m (multiline) — make ^ and $ match line starts/ends. s (dotAll) — make . match newlines. u (unicode) — enable full Unicode support.
Capture groups use parentheses () to capture a portion of the match. They appear in the match results as group 1, group 2, etc. Named groups use (?<name>...) and are accessible by name. Non-capturing groups use (?:...).
Greedy quantifiers (*, +, ?) match as much text as possible. Lazy versions (*?, +?, ??) match as little as possible. For example, <.+> on <b>text</b> matches the whole string, while <.+?> matches just <b>.
Special characters . * + ? ^ $ { } [ ] | ( ) \ must be escaped with a backslash \ to match literally. For example, to match a literal dot use \. — otherwise . matches any character except newline.

About the Regex Tester

Write and test regular expressions against any sample text in real time. Highlights all matches as you type, shows captured groups separately, and lets you toggle flags (case-insensitive, multiline, global, dotall). Supports both JavaScript and PCRE syntax notation. Useful for validating patterns before using them in code or scripts.