JS1k 2012 demo — "BBCode Parser" by Dieki Noordhoek

BBCode Parser. This isn't just a quick regex; it parses the message into a tree, and so supports bbcodes with values, like [url]. Unfortunately I had to strip out most of my code for handling invalid…