🏠 ホーム
ベンチマーク
📊 すべてのベンチマーク 🦖 恐竜 v1 🦖 恐竜 v2 ✅ To-Doリストアプリ 🎨 クリエイティブフリーページ 🎯 FSACB - アルティメットショーケース 🌍 翻訳ベンチマーク
モデル
🏆 トップ10モデル 🆓 無料モデル 📋 すべてのモデル ⚙️ 🛠️ Kilo Code モード
リソース
💬 💬 プロンプトライブラリ 📖 📖 AI用語集 🔗 🔗 有用なリンク
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.