I have a program that scans input documents, looking for people's names, and tries to match these against a list of names I control in a database. The database table has FirstName and LastName columns. I cannot control the format or content of the input, which is a series of strings, each representing a "line" from a document. These lines may contain 0 or more characters. Currently, my program splits each line on the delimiters "," (comma), "." (period) and " " (space), and then compares the resulting substrings against the FirstName and LastName columns of my database table. However, it often fails to find a match with multipart names like "NAME_1", or names with special characters like "O'Malley".

From a high level, is there a better way to approach this problem or accurately matching lines of text to names? Provide your reponse without using the word format.
user