A Fast Algorithm for String Matching with Mismatches