0
How do I filter invalid names using regex perhaps?
I'm trying to filter invalid names from a text file. I need to use regex to match the invalid names that includes consecutive duplicate characters. Example: fffghpn, sf, ghk.se Tyo-es, hyd'esa There are also valid name like O'Brien, Dennis-Mary etc. which I don't want to remove. Any ideas?
1 ответ
0
If you have the same format for all the strings in your file, read them as dictionaries or lists and check only those items that definetely can not contain erroneous names (like all fields except names and surnames)?