Forum Moderators: coopster
preg_match_all('/(http:\/\/¦www\.)[^\s\'">]+/', $text, $matches);
$urls = $matches[0];
But I can't quite get how to tweak it to skip over one particular URL (mine!)
Can someone please insert 'mysite.com' appropriately in the above expression to pull all URL's EXCEPT mysite.com.
Sorry for the lack of help, I'm still trying to make the pattern for this myself!
My regex skills are not fine-tuned at the moment. ;)
Good luck!
$mysite = 'example.com';
$mysite = preg_quote($mysite, '/');
$pattern = "/((http:\/\/¦www\.)[^\s'\"\>\<]+)(?<!$mysite)[\s'\"\>\<]/i";
// $matches[1] has the full url then ...
print '<pre>'; print_r($matches[1]); print '</pre>';