Test a regular expression against sample text
A regular expression describes a text pattern for searching, validating, replacing, or extracting data. Enter the pattern without surrounding slash delimiters, choose flags such as global or case-insensitive matching, and paste representative sample text. Live highlighting shows what the expression captures, while syntax errors identify malformed groups, character classes, escapes, or quantifiers before the pattern reaches application code.
A match in one sample does not prove that a regex handles every valid and invalid input. Test empty values, line breaks, Unicode text, very long strings, and near-matches that should be rejected. Regex behavior can differ between JavaScript, Python, .NET, PCRE, and other engines; this tester follows the browser’s JavaScript engine. Avoid patterns with excessive nested backtracking when input may be attacker-controlled, because a seemingly small expression can consume significant CPU on crafted text.