Codice PHP:
$stringa "Ciao a tutti";
echo 
preg_match("#^ciao#i",$stringa) ? 'inizia così' 'non inizia così'