Refactored some of the code involving compiling the main regular expression.
Refactored some of the code involving compiling the main regular expression.

android-ia/platform_external_pystache,android-ia/platform_external_pystache