🏠 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

Advanced Regular Expression Construction

#regex #pattern-matching #validation #string-manipulation

Generate and explain a complex regular expression for validating specific date formats and leap years.

Act as a Regular Expression Expert. Construct a single, highly optimized regular expression that validates a date string in the format 'DD-MMM-YYYY' (e.g., 15-Feb-2024). The regex must strictly enforce valid days per month, including leap years for the Gregorian calendar, and reject invalid dates like 31-Apr-2023 or 29-Feb-2023. After providing the regex, break down every component of the pattern and explain the logic used to handle the leap year calculations and variable month lengths.