Hm. Let us say that we have a string like the one belov.
Code: Select all
<?php
$string = "blablabla... http://site.com/dir/page.php?var=something blablabla... http://anothersite.com/ blablabla";
?>Code: Select all
<?php
$string = "blablabla... <a href="http://site.com/dir/page.php?var=something" target="_blank">http://site.com/dir/page.php?var=something</a> blablabla... <a href="http://anothersite.com/" target="\blank">http://anothersite.com/</a> blablabla";
?>I'm not so steady with regular expressions