PDA

View Full Version : Replace string


Ryltar
01-19-2005, 08:54 PM
Hi, me again. I am trying to replace a bit string to create a varible. This is what I am using and immediety after it is part of the page I am trying to get it from. When ever I do this though, it saves the entire page as the var...
Thanks for any help
~matt

$changed = ereg_replace ( "/<td><b>Type Registration<\/b><\/td><td>&nbsp;&nbsp;<\/td> \n<td>(.+)<\/td><\/tr>/", "$2", $returned );
<td><b>Type Registration</b></td><td>&nbsp;&nbsp;</td>
<td>Individual</td></tr>

Fou-Lu
01-20-2005, 02:28 AM
Your backreference should be a one, not a two.
${1} \\1 etc.