Making a little bit smaller

Minor optimizations in regex