CodingFree→ ChatGPT / Claude
Regex Builder & Explainer
Get a tested regular expression plus a plain-English breakdown.
What you get: A regex, an annotated explanation and a table of tests.
Write a regular expression for {{regex_flavor}} that matches: {{should_match}}. It must NOT match: {{should_not_match}}.
Return: the regex; a token-by-token explanation; 8 test strings (4 that match, 4 that do not) in a table with expected results; edge cases and where the regex is fragile; performance notes (catastrophic backtracking risk); and a simpler non-regex alternative if one is safer. Do not claim it works for inputs you did not test in the table.