Minor adjustments for speed and memory, so that regex patterns don't have to be reconstructed for every comment/injection type.