Search code examples
regexlevenshtein-distance

Levenshtein distance in regular expression


Is it possible to include Levenshtein distance in a regular expression query?

(Except by making union between permutations, like this to search for "hello" with Levenshtein distance 1:

.ello | h.llo | he.lo | hel.o | hell.

since this is stupid and unusable for larger Levenshtein distances.)


Solution

  • is there possiblity how to include levenshtein distance in regular expression query?

    No, not in a sane way. Implementing - or using an existing - Levenshtein distance algorithm is the way to go.