<?php $code = [ 'PO/2022/0001', 'abc', 'xyz', 'PO2022/0001', 'XY/2022/0002', 'PO/2022/0232' ]; var_export( preg_filter( '~^[^/]+\K(?:/[^/]+){2}$~', '', $code ) );
You have javascript disabled. You will not be able to edit any code.