Regex Tester
Test regular expressions against text with live match highlighting.
Pack my box with five dozen liquor jugs.
How vexingly quick daft zebras jump!
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.