Q:

Text pattern search and match

So the question, I hope, is simple...
I have 800 unique strings and I need to find, select and classify each one of them from a set of 30000 plus strings... ok, until there no problem. The trick is that each one of those 30thousand+ strings can have special characters in the string and I need to find and select those that are similar to the 800 unique ones
As for example, I have a unique string "AbCdef 23_3 zexy" and in the huge set of strings I can find things like "AbCde%f 23_3 zexy" or "AbCdef 23 3 zexy" or "AbCdef 23-3 zexy" or "AbCdef 23_3° zexy¬" all of them accepted as part of the group that corresponds to "AbCdef 23_3 zexy" the original one
I have tried some tools but cannot find the right way to classify the groups. 
Some idea about tools or code to be used??

A:

You could use Python to do this by replacing the target string of each special character. As below, if you have special characters like '%', then you can load your strings in a text file, remove them with filedata.replace as shown, with your new strings being outputted into a new text file. Once you have eliminated all special characters, you can then compare which ones still do not correspond to the group after removing them.
# Read in the file
with open('file.txt', 'r') as file :
  filedata = file.read()
# Replace the target string
filedata = filedata.replace('%', '')
filedata = filedata.replace('°', '')
# Write the file out again
with open('file2.txt', 'w') as file:
  file.write(filedata)

