in reply to replacing variable in regex - probs with special chars?

Surely the code can be simplified by using a s///g at the top level instead of looping?
$source =~ s/(\[link title:(.*?)\](.*?)\[\/link])/<a href='$3'>$2<\/a> +/gi;
The obvious limitation over the original solution is that it doesn't allow one to loop, but perhaps this would work?
while ($source =~ s/\G(\[link title:(.*?)\](.*?)\[\/link])/<a href='$3 +'>$2<\/a>/i) { print "complete: $1\ntitle: $2\nurl: $3\n"; }

--
integral, resident of freenode's #perl