Remove unnecessary regex code.