Test, validate and match regular expressions
This regex validates date and time strings conforming to the ISO 8601 standard. It accurately matches various formats including calendar dates (YYYY-MM-DD), week dates, and ordinal dates, along with optional time and timezone offsets (like 'Z' or '+HH:MM'). It utilizes backreferences to ensure consistent use of separators within the date and time components. It is ideal for validating international date formats in APIs and databases.