improved regex for special matches