A VERY simple way of doing it:
$input = '[URL]xxx[/URL]';
$url = explode('[URL]', $input);
$url = explode('[/URL]', $url[1]);
$url = '<a href="' . $url[0] . '"/>Link</a>';
echo $url;
There are most certainly better ways of doing this. Maybe with regex or preg_replace.