🏠 Beranda
Benchmark
📊 Semua Benchmark 🦖 Dinosaurus v1 🦖 Dinosaurus v2 ✅ Aplikasi To-Do List 🎨 Halaman Bebas Kreatif 🎯 FSACB - Showcase Utama 🌍 Benchmark Terjemahan
Model
🏆 Top 10 Model 🆓 Model Gratis 📋 Semua Model ⚙️ Kilo Code
Sumber Daya
💬 Perpustakaan Prompt 📖 Glosarium AI 🔗 Tautan Berguna
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.