in reply to Perl Regular Expressions
Random micro ops, ([A-Z]{2,4})(\s{0,2}) is simpler to write as (....) unless theres some specific reason you want to exclude the characters currently being excluded ( [^\sA-Z] ).
This \s((.*)\n)* could probably be better written ([^\n]+)\n which means "One or more non-new line characters, followed by a new line.