I am trying to use a regex to match a specific link from a ripped page. At the moment I have taken the following pattern from another script. $pattern = "#<a href=\"([^\">]+)\"[^>]*>#i"; It works perfectly well at matching all links and the link I want is captured, however as regex's aren't my domain, I have no idea how to only match links that start with http://.subdomain.domain.com/etc/ or contains a specific sequence in the url. Could anyone lend a hand?