Answer the question
In order to leave comments, you need to log in
How to set an error of one character per line?
Is there any pattern for searching in the form of a string. For example, let's take the string "elephant". It is
necessary to make it so that if the words "sloon" or "clone", etc., are in the database, with an error of one character, they are also displayed.
Can this be done through regular expressions or something else?
Answer the question
In order to leave comments, you need to log in
the solution was to include the library
https://www.npmjs.com/package/levenshtein-edit-distance
Levenshtein algorithm, example usage:
https://jsfiddle.net/fL4vak4u/1/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question