Jump to content

[SOLVED] need a regex pattern


hansford

Recommended Posts

need a pattern for an entire anchor tag containing specifically this URL: http://www.sedoparking.com or

http://www.sedoparking.complusanystringattached

-------------------------

<a href='http://www.sedoparking.com'>whatever is here</a>

<A HREF='http://www.sedoparking.com'>whatever is here</A>

<A HREF="http://www.sedoparking.com">whatever is here</A>

<a href="http://www.sedoparking.com">whatever is here</a>

<a href        =        'http://www.sedoparking.com'        >whatever is here</a>

-----------------------------

$fil = file_get_contents('http://www.frozen.com');`

$find="/<[aA]\s*[ahrefHREF]*\s*=\s*[\"\']http:\/\/www\.sedoparking\.com.*[\'\"]\s*>.*<\/[Aa]\s*>";

$ret = preg_match_all($find, $fil, $matches, PREG_SET_ORDER);

echo $ret;  // returns 0

 

any input or advice would be appreciated.

 

 

Link to comment
https://forums.phpfreaks.com/topic/108828-solved-need-a-regex-pattern/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.