Mi sono intoppata..
ho provato con un stringa tipo:
$stringa=" testo testo Art. 7 testo testo testo Art. 8 testo testo";
vorrei ottenere:Codice PHP:
$stringa=strtolower($stringa);
if(preg_match_all("/[art\.]+ ([0-9]{1,})*/",$a,$match))
{
for($i=0;$i<count($match[0]);$i++)
{
$stringa=str_replace($match[0][$i],"<".$match[0][$i].">",$stringa);
}
}
ma non vaCodice PHP:
$stringa=" testo testo <art7> testo testo testo <art8> testo testo";