<?php $input = "12 XY 123456789"; if (preg_match('/^(?:(\d+)\s*)?(A|B|DF|XY)(?:\s*(\d+))?$/', $input, $matches)){ array_shift($matches); print_r($matches); }
You have javascript disabled. You will not be able to edit any code.