i write preg match rules:
$subject = 'text <a href="http://google.com">LINK</a> text text <a href="http://google2.com">LINK2</a>';
$search = array(
'/\<a href\="(.*)\">(.*)\<\/a\>/i'
);
$replace = array(
"[a href=\"$1\"]$2[/a]"
);
echo preg_replace($search, $replace, $subject);
When in text only one link everything works great, then more then one - crach code
This i get when is more than one link: "text [a href="http://google.com">LINK text text "