ad esempio:

Codice PHP:
$text"un testo, suddiviso da spazi";
foreach(
explode(" "preg_replace("/[^A-Za-z0-9 ]/"''$text)) as $word) {
    if(
strlen($word) >= 6) {
        echo 
"$word è più lunga di 6 <br />";
    }