Add regex to compile mode.