Thank you for reply, but the <a> is not the only tag in my string. ... % ereg_replace("^<a href=\"([:alnum:])\">$", "<a href=\"\\1\" % target=\"_blank\">", $string) % % I echo the result but nothing changing. % What Im doing wrong? Is your string really the only thing on a line, or could it be anywhere in the input? The ^ (beginning) and $ (ending) anchors are probably messing you up. If your format *is* like this, you could do a quick preg_replace('/>$/',' target="_blank">',$string) (untested) and be done with it :-) % Thanx -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php