Słaby jestem w wyrażeniach regularnych i potrzebuje pomocy. Mianowicie chce aby z tekstu wywalił mi wszystkie znaczniki HTML javy itp ALE chce żeby zostawił same <br />. mam taki skrypt z php.net:
<?php function html2txt($document){ '@<style[^>]*?'.'>.*?</style>@siU', // Strip style tags properly '@<[/!]*?[^<>]*?'.'>@si', // Strip out HTML tags '@<![sS]*?--[ \t\nr]*>@' // Strip multi-line comments including CDATA ); return $text; } ?>
Ale ten usuwa wszystko chce aby zostawił tylko "<br />"