Regex Tester

Test regular expressions against your text in real time. See matches highlighted with capture group details.

/ /
Test String
Highlighted Matches
0 matches

What Is a Regular Expression?

A regular expression (regex or regexp) is a sequence of characters that defines a search pattern. Originally developed in the 1950s by mathematician Stephen Kleene, regular expressions are used in virtually every programming language for pattern matching within strings — finding, replacing, validating, and extracting text that matches specific patterns.

Regular expressions are indispensable tools for developers, data analysts, system administrators, and anyone who works with text processing. They can match simple literal text or complex patterns including character classes, quantifiers, grouping, lookahead/lookbehind assertions, and backreferences.

How to Use This Tool

Enter your regex pattern in the pattern field between the forward slashes. Toggle the flags using the checkboxes or type them directly in the flags field. Type or paste your test string in the text area. Matches are highlighted in real time as you type, and match details including capture groups are displayed below.

Regex Flags Explained

Common Regex Patterns

Regex Syntax Quick Reference

Frequently Asked Questions

What is a regular expression?

A regular expression is a pattern that describes a set of strings. It is used for searching, matching, and manipulating text in programming. Virtually every language supports regex — JavaScript, Python, Java, PHP, Go, Ruby, and more.

What do the regex flags mean?

Flags modify how the regex engine processes the pattern. The most common are: g (global — find all matches), i (case-insensitive), m (multiline — ^ and $ match per line), s (dotAll — . matches newlines), and u (Unicode support).

Related Tools