Fix regex used in compileAttributes