<? $str = "1234567 foo bar 122345678 baz 1222345 abc 11111222345 de xy 712111345446 is valid or even 49833376543"; if(preg_match_all('~\d{7,}~', $str, $out) > 0) { $res = array_filter($out[0], function($v) { return count(array_unique(str_split($v))) >= 7; }); } print_r($res); ?>
You have javascript disabled. You will not be able to edit any code.