Код (Text): $a = "текст...<a href="/files/test/4563454325/file.doc" target="_blank">ФАЙЛ</a>текст..."; Как убрать <a href="/files/test/4563454325/file.doc" target="_blank"></a>чтобы в итоге получили: Код (Text): $a = "текст..ФАЙЛтекст..."; А если имеем с http:// , то тогда оставляем как есть: Код (Text): $a = "текст...<a href="http://www/hz/com/files/test/4563454325/file.doc" target="_blank">ФАЙЛ</a>текст..."
PHP: <?php ini_set('display_errors',1); error_reporting(E_ALL); setlocale(LC_ALL, 'ru_RU.CP1251', 'rus_RUS.CP1251', 'Russian_Russia.1251'); $m ='fish, derevo, <a href="/files/test/4563454325/file.doc" target="_blank">money2</a> Hello Dima,how are you <a href="http://www/hz/com/files/test/4563454325/file.doc" target="_blank">money1</a> hello Mike.'; $poisk='/<a href=\"\/.+?>(.+?)<\/a>/si'; $replace='$1'; $new=preg_replace($poisk,$replace,$m); echo $new; ?> Также не забывай о функции strip_tags . Но в данном случае она не поможет.