Use regmatch when checking for duplicates in hwtable