further refinements to regexp