Regex Tester

Test regular expressions with live match highlighting and replace mode. Supports global, case-insensitive, and multiline flags.

Examples:

Frequently Asked Questions

What is a regular expression (regex)?

A regex is a pattern used to match and manipulate text. It uses special characters like . (any char), * (0+ repeats), + (1+ repeats), ? (0-1), and [] (character class).

What does the ^ and $ mean in regex?

^ anchors the match to the start of a line, and $ anchors to the end of a line. For example, ^hello matches "hello world" but not "say hello".

What are capture groups?

Capture groups are subpatterns enclosed in parentheses () that allow you to extract and reuse matched text. Example: (\d{3})-\d{4} captures the first 3 digits of a phone number.