We should probably try and get a moderator to split this thread.
Anyway
PHP Code:
<?php
$code_is="<em> <em>et al.</em></em>
<td> </td>
<td> </td>";
$code_is = preg_replace('/<([a-zA-Z].*?)>\s*<\1>/s', " <$1>", $code_is);
$code_is = preg_replace('/<(\/.*?)><\1>/s', "<$1> ", $code_is);
echo $code_is;
?>
I didn't look too closely into why it wasn't working. All I did was fix a few of the more obvious errors and then tried it out again and it seems to be working.
EDIT: This is a little better though:
Code:
$code_is = preg_replace('/<([a-zA-Z].*?)>\s*<\1>/si', " <$1>", $code_is);
$code_is = preg_replace('/<(\/.*?)><\1>/si', "<$1> ", $code_is);
Bookmarks