fix: PLZ regex matches lowercase text and D-78467 format

Patterns ran on text.lower() but searched [A-Z] — changed to [a-z].
Also accept D-12345 prefix (common German format).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-05-07 13:28:00 +02:00
parent 1005ba0398
commit 870953f579
3 changed files with 6 additions and 6 deletions
@@ -25,8 +25,8 @@ ART13_CHECKLIST = [
"label": "Vollstaendige Anschrift (PLZ + Ort)",
"level": 2, "parent": "controller",
"patterns": [
r"\d{5}\s+[A-Z\u00c0-\u017e]\w+",
r"[A-Z\u00c0-\u017e]\w+(?:str|stra(?:ss|ß)e|weg|platz|allee|gasse)\s*\.?\s*\d",
r"(?:d[\-\s]?)?\d{5}\s+[a-z\u00c0-\u017e]\w{2,}",
r"[a-z\u00c0-\u017e]\w+(?:str|stra(?:ss|ß)e|weg|platz|allee|gasse|ring|damm)\s*\.?\s*\d",
],
"severity": "MEDIUM",
},