Help for this page
$text =~ s#(\[([^|])+\|([^\]]+)]#<a href="http://$1">$2</a>#g;
$text =~ s#\[link=(["'])(\S+)\1]([^[])+\[/link]#<a href="$2">$3</a>#g;