WORK 57 words
Critique This Regex Before It Breaks In Production
The regex works on every test case you tried and you still do not quite trust it. This checks for inputs that slip through, valid inputs it wrongly rejects, and the kind of catastrophic backtracking that only shows up under load, then explains exactly why the original was wrong before offering a fix.
Review this regular expression for correctness and hidden failure modes: {REGEX_PATTERN}, intended to match [UK postcodes] in {LANGUAGE}. Point out any inputs that would incorrectly pass, any valid inputs that would be wrongly rejected, and any catastrophic backtracking risk. Suggest a corrected version if problems are found, and explain in one sentence why the original was wrong. ⚠ human-in-the-loop: you are responsible for the results of using this prompt, not us.