DevTools

Regex Tester Online

Test, debug and explore regular expressions with real-time matching and replacement.

Regex
Enter regex and text to see matches
About Regex Tester

A regular expression (regex) is a sequence of characters that defines a search pattern for matching, extracting, or replacing text. Regex is supported in virtually every programming language, text editor, and command-line tool, making it an essential skill for developers.

This free online regex tester lets you write and test regular expressions against sample text in real time. It highlights all matches, displays captured groups, supports global (g), case-insensitive (i), and multiline (m) flags, and includes a find-and-replace mode with back-reference support ($1, $2, etc.).

Common use cases: validating email addresses, phone numbers, and URLs, extracting structured data from log files, writing search-and-replace patterns for code refactoring, testing regex before embedding them in application code, and learning regex syntax with instant visual feedback.

Frequently Asked Questions
What is a regular expression (regex)?

A regular expression is a pattern of characters that defines a search rule for matching text. It is used in virtually every programming language and text editor.

How do I test a regex online?

Type your regex pattern in the pattern field, enter your test text below, and matches are highlighted in real time. You can toggle flags and use replace mode.

What do regex flags g, i, and m mean?

g (global) finds all matches. i (case-insensitive) ignores letter casing. m (multiline) makes ^ and $ match the start and end of each line.

Can I use capture groups and back-references?

Yes. Use parentheses () to create capture groups. In the replace field, reference them with $1, $2, etc. Named groups (?<name>...) are also supported.