🏠 Accueil
Benchmarks
📊 Tous les Benchmarks 🦖 Dinosaure v1 🦖 Dinosaure v2 ✅ To-Do List Apps 🎨 Pages Libres 🎯 FSACB - Showcase 🌍 Traduction
Modèles
🏆 Top 10 Modèles 🆓 Modèles Gratuits 📋 Tous les Modèles ⚙️ Modes Kilo Code
Ressources
💬 Prompts IA 📖 Glossaire IA 🔗 Liens Utiles
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.