Skip to content

regex for ISO dates

^(\d{4}-\d{2}-\d{2})(T\d{2}:\d{2}:\d{2}(\.\d{3})?(Z|[+-]\d{2}:\d{2})?)?$

iso_regex

matches parts of the iso date into groups, so that you can for example sort by iso dates

https://regex101.com/r/RfMAcx/1, credit