Click here to Skip to main content
15,662,926 members
Articles / Database Development


9 bookmarked

Fast Typo-Insensitive String Matching in a Program and a Database

Rate me:
Please Sign up or sign in to vote.
4.73/5 (11 votes)
12 Jul 2021CPOL7 min read
Strings that differ by typos can be matched.
Typos can occur in search terms, databases, or other searched text. The functions presented below can handle matching words that differ by typos that are limited so that matched words look like one may have resulted from an attempt to type the other one. These functions are written in C++ and SQL. They are then modified to allow for searching for a word in a larger portion of text. The time complexities of these functions are addressed.


Daily Counts


Weekly Counts


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Written By
United States United States
While working as an engineer, I occasionally applied my problem-solving skills to software problems. For example, I noticed that numbers in increasing filenames did not always increase. I tinkered with solutions and subsequently wrote an article that was published in Dr. Dobb’s Journal.

After that job fizzled, I switched to programming full time and have applied my programming skills to multimedia education, web-based games of skill, legal-compliance and ethics-training courses, a portable PET scanner, and shareware programs.

Comments and Discussions