Skip to content

Instantly share code, notes, and snippets.

@msouth
Last active August 29, 2015 14:19
Show Gist options
  • Save msouth/bdf987d50fa500bc9085 to your computer and use it in GitHub Desktop.
Save msouth/bdf987d50fa500bc9085 to your computer and use it in GitHub Desktop.
use strict;
use warnings;
while (<DATA>) {
s/[<>]//g;
s{\[((/)?(b|i|s))\]}{<$1>}g;
print;
}
__DATA__
<script>
do_somethign_awful();
</script>
an [b]actual[/b] comment with [i]correct[/i] bbcode. And [s]strikethrough[/s]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment