legacy regex too confusing, simplified