BBCode

BBCode ("Bulletin Board Code") is a lightweight markup language used to format messages in many Internet forum software.

[citation needed] The available "tags" of BBCode are usually indicated by square brackets ([ and ]) surrounding a keyword, and are parsed before being translated into HTML.

[2] (Many variants for li and /li, list types – unordered and ordered, with different bullets or counter formats – etc.)

BBCode is typically implemented by applying a series of regular expression string-replace operations upon the input.

Because regular expressions are limited in analyzing the structure of text input, this has the artifact that any non-hierarchical BBCode input will be transformed into invalid non-hierarchical HTML without error.