Regex Datoer

Datoer angives ofte på formen 01-12-2009, men kan konverteres til år - måned - dato med:

([\d]{2})-([\d]{2})-([\d]{4}) » \3-\2-\1

Datoer på formen 2009.7.3 kan konverteres til 2009.07.03 med:

(\d)(\d)(\d)(\d)\.(\d)\.(\d)\b » \1\2\3\4.0\5.0\6

(\d)(\d)(\d)(\d)\.(\d)(\d)\.(\d)\b » \1\2\3\4.\5\6.0\7

(\d)(\d)(\d)(\d)\.(\d)\.(\d)(\d)\b » \1\2\3\4.0\5.\6\7

Medmindre andet er angivet, er indholdet af denne side licenseret under Creative Commons Attribution-ShareAlike 3.0 License