Algorithms for Approximate String Matching