[php] regex
| From: | Maitre Dracula | Date: | Fri, 28 Nov 2003 20:04:13 +0000 |
| Subject: | [php] regex | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-9212@lists.php.net to get a copy of this message | ||
hi !
sorry i speak english like a spanish cow ;-)
i want to replace html tags by the tags colored and parsed
example : <table align="left" style="color: white">
to
<span class="html"><<b>table</b>
align="<i>left</i>" style="<i>color:
white</i>"<b>></b></span>
i have made a regex but it's not right :
$text = preg_replace('#<([^ ].+) +((.*)=(.*))*/*>#m','[html][b]<\\1[/b]
\\3=[i]\\4[/i][b]>[/b][/html]',$text);
help please !!!!!!!
Dracula