AI Regex Architect
Describe what you want to match in plain English. Get the exact regular expression with a full breakdown. 100% client-side — no data leaves your browser.
regex>
Flags:
// generated pattern
// explanation
// test your regex
Matches will appear here...
Matches: 0
Groups: 0
Regex Cheat Sheet
Character Classes
. Any character (except newline)\d Digit [0-9]\D Not a digit\w Word char [a-zA-Z0-9_]\W Not a word char\s Whitespace\S Not whitespaceQuantifiers
* 0 or more+ 1 or more? 0 or 1 (optional){n} Exactly n times{n,} n or more times{n,m} Between n and m times*? Lazy (non-greedy) matchAnchors & Boundaries
^ Start of string/line$ End of string/line\b Word boundary\B Not a word boundary(?=...) Positive lookahead(?!...) Negative lookahead(?<=...) Positive lookbehindGroups & Alternation
(...) Capturing group(?:...) Non-capturing group(?<name>...) Named groupa|b Alternation (a or b)[abc] Character set[^abc] Negated set[a-z] RangeCommon Escape Sequences
\n Newline\t Tab\\ Literal backslash\. Literal period\* Literal asterisk\+ Literal plus\? Literal question markFlags
g Global (find all matches)i Case-insensitivem Multiline (^ $ per line)s Dotall (. matches \n)u Unicode supporty Sticky (from lastIndex)