<?php $a = [ 'sss4444dfdf', //лишние '444444', //много 'sdfsdf', //все не то '', // '4', //мало ]; print_r(preg_filter('/^\D*(\d{2,4}).*$/', '$1', $a));
You have javascript disabled. You will not be able to edit any code.