Change pattern compilation on whitespace matching