Possible Duplicate:
Grabbing the href attribute of an A element
Hello,
I have the following html I want to parse:
<td align="left" nowrap="nowrap"><a href="XXXXXXX">
I want to save XXXXX on a variable. I know next to nothing of regular expressions. I know how to do it using strpos, substr, etc. But I believe it is slower than using regex.
if (preg_match('!<td align="left" NOWRAP><a href=".\s+/.+">!', $result, $matches))
echo $matches[1];
else
echo "error!!!";
I know the previous code is an atrocity to a regex expert. But I really have no idea how to do it. I need some tips, not the full solution.