improve regexp formulation