Rosetta Code/Fix code tags: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 34:
for (@langs) {
$text =~ s|<$_>|<lang $_>|g;
$text =~ s|</$_>|</&#2f;lang>|g;
}
 
$text =~ s|<code (.+?)>(.*?)</code>|<lang \1>\2</&#2f;lang>|sg;
 
print $text;
Anonymous user