Hi,
I'm writing a regular expression that will search for specific <a href> tags and modify the URL within them. Here is what I have:
$mytxt = preg_replace("!(<td class=\"helptoc-question\"><a href=\"http://www.mydomain.com/page.html#[0-9]\">)(.)(</a></td>)!", "!(<a href=\"#[0-9]\">)(.)(</a></td>)!", $_POST['txt']);
Basically, it removes everything in the URL before the # mark and keeps everything else (including the text in between the <a></a> tag). I don't believe there is a spacing issue so ignore that if there appears to be spaces when I post this thread.
Any help would be much appreciated.