$text = '<<< >>> Some text about scripting and frameset, but script and f r a m e must be replaced with spaces.';
$words = array('script','frame','yes','>','<');
foreach($words as $word)
{
$word= preg_quote($word,'/');
$regexp = '/\b'.join('\s*',preg_split('/(.)/',$word,-1,PREG_SPLIT_NO_EMPTY|PREG_SPLIT_DELIM_CAPTURE)).'\b/si';
$text = preg_replace($regexp,'',$text );
};
Вот этот скрипт работает но он не заменяет < > - $word тут- экранируется - или я ,что то ни так делаю ?