Test, debug and replace regular expressions with live match highlighting, group capture, replace mode and a pattern library.
Regular expressions (regex) are patterns used to match, search, and manipulate text. They are supported in virtually every programming language — JavaScript, Python, Java, Ruby, PHP, Go — and in command-line tools like grep, sed, and awk. Once you understand the core syntax, regex becomes one of the most powerful tools in any developer or data analyst's toolkit.
Character classes: [abc] matches a, b, or c. [a-z] matches any lowercase letter. [^abc] matches anything except a, b, c. \d matches any digit (0-9). \w matches word characters (letters, digits, underscore). \s matches whitespace.
Quantifiers: * matches 0 or more. + matches 1 or more. ? matches 0 or 1 (makes it optional). {3} matches exactly 3. {2,5} matches between 2 and 5. Adding ? after a quantifier makes it lazy (matches as little as possible).
Anchors and boundaries: ^ matches the start of a line. $ matches the end. matches a word boundary. These are critical for avoiding partial matches — cat matches "concatenate" but cat only matches the standalone word "cat".
Email validation: ^[\w.-]+@[\w.-]+\.\w{2,}$. US phone numbers: ^\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}$. URLs: https?://[\w-]+(\.[\w-]+)+[^\s]*. Dates (MM/DD/YYYY): ^(0[1-9]|1[0-2])\/(0[1-9]|[12]\d|3[01])\/\d{4}$. Use this tester to experiment with patterns against your real data before implementing them in code.