Regex-Pattern-Builder mit Erklärung
Why this prompt matters
Regex without explanation is write-only code. Test cases make patterns verifiable and the explanation makes them maintainable.
What we use it for
Text processing
Prompt
Build a regex pattern for the described requirement. Provide: 1) The pattern with inline comments, 2) A plain-English explanation of each part, 3) 5 strings that should match, 4) 5 strings that should NOT match, 5) Edge cases to be aware of, 6) Performance considerations for large inputs.
Result
**Pattern**: `^(?=.*[A-Z])(?=.*[a-z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$`
**Explanation**: - `^` — Start of string - `(?=.*[A-Z])` — Lookahead: at least one uppercase letter - `(?=.*[a-z])` — Lookahead: at least one lowercase letter - `(?=.*\d)` — Lookahead: at least one digit - `(?=.*[@$!%*?&])` — Lookahead: at least one special character - `{8,}$` — Minimum 8 characters total
**Matches**: `P@ssw0rd`, `MyP@ss12` **Doesn't match**: `password`, `12345678`
Regex-Pattern-Builder mit Erklärung
Erstellt komplexe reguläre Ausdrücke mit schrittweisen Erklärungen.
Dieser KI-Prompt ist darauf ausgelegt, Ihnen die besten Ergebnisse zu liefern. Folgen Sie den Anweisungen und passen Sie die Parameter an Ihre spezifischen Bedürfnisse an.
Für die besten Ergebnisse geben Sie detaillierten Kontext an und spezifizieren Sie das gewünschte Ausgabeformat. Experimentieren Sie mit verschiedenen Variationen, um die beste für Ihren Anwendungsfall zu finden.