Simplify regular expressions in compile.js