sub replace {
my ($tag,$attr,$content) = @_;
$attr ||= $content;
if ($tag eq 'b') {
return "$content";
}
elsif ($tag eq 'url') {
return "$content";
}
# etc. etc. etc.
}
s/\[(\w+)=?(\w*)\](\w+)\[\1\]/replace($1,$2,$3)/esg;
####
--
Joost downtime n. The period during which a system
is error-free and immune from user input.