Simplify regex usage