foreach (text as word)
<?php
$text = [
'n342gs',
'e234fd',
'w2312fv'
];
$example = "/[a-z][0-9]{3}[a-z]{2}/iu";
foreach ($text as $word) {
// сюда будет помещено первое
// совпадение с шаблоном
$match = [];
echo "- верный номер '{$match[0]}'\n";
} else {
}
}
// your code goes here
?>
Parsed in 0.010 seconds