fixed bug where that requires [code] to be [code:]

Prior to change, `[code]` would not be processed correctly, and would need to be `[code:]`. Also switched to named groups to make reading the code easier.