Regex Tester

Test regular expressions against text with live match highlighting.

[ Advertisement ]
① Pattern
/
/
gglobal – find all matchesicase-insensitivemmultilinesdot matches newlines
② Test string
③ Matches
The quick brown fox jumps over the lazy dog.
Pack my box with five dozen liquor jugs.
How vexingly quick daft zebras jump!
[ Advertisement ]

Regular expressions: a practical guide

Regular expressions (regex) are sequences of characters that form a search pattern. They are supported in virtually every programming language and text editor. Mastering regex can replace dozens of lines of string-manipulation code with a single expression.

Essential regex syntax: . matches any character, \d matches digits, \w matches word characters (letters, digits, underscore), + means "one or more", * means "zero or more", ? makes the preceding element optional, and ^/$ anchor to the start/end of a line.

Flags change matching behavior: g (global) finds all matches instead of stopping at the first, i makes the match case-insensitive, and m makes ^ and $ match line starts and ends instead of the whole string.

Frequently asked questions
What are regular expressions?
Regular expressions (regex) are patterns used to match character combinations in strings. They're used in search, validation, text parsing, and find-and-replace operations.
What regex flags are available?
g (global — find all matches), i (case-insensitive), m (multiline), s (dotAll — dot matches newlines).