Using my code bellow, How can I get results array only for users who have 10 chars in address with preg_match_all and regular expressions?
this is my code
$data = 'Maria address is QwMP_jkRkM and lives in Peru, Joseph address is QMPjkRk2ZM and lives in Peru, Miguel address is Q.wMP_jkRljo_hkM and lives in New York, George address is hdiJoW58_7 and lives in Austria';
preg_match_all('#(.*?) address is (.*?) and lives in (.*?)#', $data, $output);
Actually returns all matches, I need to remove the results that contain more than 10 characters in their address.
Note: I should not use foreach