<?php $s = "any text CA-2019-6-000000 any text"; if (preg_match('~\b([A-Z]{2})[-\s](20[0-9]{2}|2100)-(0?[1-9]|1[0-2])-(\d{6})(?!\d)~', $s, $m)) { print_r($m); }
You have javascript disabled. You will not be able to edit any code.