fix compare with regex