Hey!
That's something we call fuzzy string matching and is based on fuzzy logic (hehe). One approach is to take the string, strip all of the special characters, whitespaces and then match it with something from you database. Simple, easy, effective. The problem with this method, however, is that as the data grows, the time complexity will increase by n for n number of records. I wouldn't really recommend this if you have unsorted records.
If you have sorted, this, along with binary search should do the trick.
The mantra here is to normalise the text to its base form: something universal. Like:
HE_LLO HE LL O HELLO HeLlo
Should all come to: hello.
Feel free to ask more; I am happy to help! :)