Removed explicitly compiled regex

This was probably premature optimization, and happened outside the
function, which I didn't like.  (It's kinda function-y code, but I
didn't want the compilation to happen on every function call.  I did
briefly look into the options available for "function static" variables,
but didn't want to use anything I found right now.)

Also some comment clean-up.