I know there are a lot of questions with the same problem. I read them but I couldn't fix my code.
<?
$tabla = "<table>
<tr>
<td>
<a class='texto'>$ 2,123.01</a>
</td>
<td>
asddasdsad$,.$$$
</td>
</tr>
</table>";
echo preg_replace("<a class='texto'>\$ ([0-9]*),([0-9]*).([0-9]*)</a>", "<a class='texto'>$0$1,$2</a>", $tabla);
?>
PHP Error: Warning: preg_replace() [function.preg-replace]: Unknown modifier '$'
I would like to get:
<?
<table>
<tr>
<td>
<a class='texto'>2123,01</a>
</td>
<td>
asddasdsad$,.$$$
</td>
</tr>
</table>
?>
I tried & tested my regular expression here http://regexpal.com/ and worked. But I have somthing worong in preg_replace.