Hi guys,
Currently I have the following regex:
[php]
$link = "domain.com";
$patterns = "/\s(href)\s*=\s*\"[^\"]*".$link."\/?\"/";
[/php]
This extracts the href + the domain.
It extracts the following:
href="http://www.domain.com"
href="http://domain.com"
href="http://live.domain.com/"
It doen NOT extracts when there is a folder behind the domain such as:
href="http://domain.com/site"
href="http://domain.com?id=2"
Which all is good.
The only problem is, it must not extract any href when there is a subdomain other then www
so it should only extract
href="http://domain.com"
href="http://www.domain.com"
Can anyone help me with that?