fix issue in WriteCode where inversion ignores regex in template
Merge pull request #90 from panghy/master

fix issue in WriteCode where inversion ignores regex in template