The regular expressions in here are a bit hard to understand. Please add comments and also the `//x` modifier (http://perldoc.perl.org/perlre.html#Modifiers) so that you can split the regexp and comment on the parts.