🏠 Strona Główna
Benchmarki
📊 Wszystkie benchmarki 🦖 Dinozaur v1 🦖 Dinozaur v2 ✅ Aplikacje To-Do List 🎨 Kreatywne wolne strony 🎯 FSACB - Ostateczny pokaz 🌍 Benchmark tłumaczeń
Modele
🏆 Top 10 modeli 🆓 Darmowe modele 📋 Wszystkie modele ⚙️ Kilo Code
Zasoby
💬 Biblioteka promptów 📖 Słownik AI 🔗 Przydatne linki
Advanced

Complex Pattern Matching Engine

#regex #pattern-matching #validation #technical

Constructing a highly specific regular expression to validate multi-part data strings with conditional formatting.

Construct a single Regular Expression that validates a custom product code string. The string must start with 3 uppercase letters, followed by a hyphen. The next segment must be a numeric digit between 1 and 5. If the digit is 1, the following segment must be exactly 4 lowercase letters. If the digit is greater than 1, the following segment must be 6 alphanumeric characters. The string must end with an optional checksum digit. Explain the back-references and lookaheads used.