Find a pattern in a given string using a certain amount of edit distance