Should probably rename this, since mask/unmask isn't in play.  What we are doing here is gathering all the chunck_types into a single regular expression that will be used to scan the input strings.  This is done once, it is like registering all the chunk types.