Enhance a bit of logic (expr should be cheaper than regexp)