3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = "The time is 1020 and the time is 1340 and 1550"; $data = preg_replace('/\b(\d{2})(\d{2})\b/', "$1:$2", $data); echo $data;

preferences:
48.96 ms | 404 KiB | 5 Q