The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

As you can see, there are pitfalls involved when using regex to parse html. Whenever using dot_match_all in conjunction with the need to take newlines into account, you can always add the 's' modifier after the closing delimiter. And if there is a chance of anchor tags using uppercase characters, you can also add the 'i' modofier to make things case insensitive. Additionally, what happens if the anchor tag contains more than the href attribute? Patterns like that will not catch it.

For parsing stuff like html, I would consider using DOM / XPath instead of regex: