Test, validate and match regular expressions
Matches a date in YYYYMMDD format followed by an optional time in HHMMSS format. The date portion validates year (4 digits), month (01-12), and day (01-31). The time portion accepts valid hours (00-23), minutes (00-59), and seconds (00-59), or the special value 240000 (midnight/end of day). Commonly used in Japanese/East Asian systems where 24:00:00 represents end of day.