3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/\b\d{1,2}(?:\.\d{1,2}\.|\h+\p{Lu}\p{Ll}+\h+)(?:\d\d|\d{4})\b/u'; $str = '01.01.2022 1.01.2022 1.1.2022 1.1.22 ... Now I have a date format like this: 25 März 2023 or 25 March 2023'; preg_match_all($re, $str, $matches); print_r($matches[0]);

preferences:
23.05 ms | 405 KiB | 5 Q