🏠 Início
Avaliações
📊 Todos os Benchmarks 🦖 Dinossauro v1 🦖 Dinossauro v2 ✅ Aplicações To-Do List 🎨 Páginas Livres Criativas 🎯 FSACB - Showcase Definitivo 🌍 Benchmark de Tradução
Modelos
🏆 Top 10 Modelos 🆓 Modelos Gratuitos 📋 Todos os Modelos ⚙️ Kilo Code
Recursos
💬 Biblioteca de Prompts 📖 Glossário de IA 🔗 Links Úteis
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.