Here is an idea that takes a few (easy) steps:
import re
example_strings = ['m/oose', 'moose', 'mouse', 'm.ouse', 'ca...t', 'ca..//t', 'cat']
1. Index all of your strings so you can refer back to them by index later:
indexed_strings = list(enumerate(example_strings))
2. Store all strings with restricted characters in a dictionary using index as the key, string as the value. Then remove the restricted chars temporarily for sorting:
# regex to match restricted alphabet
restricted = re.compile('[/\.]')
# dictionary to store strings with restricted char
restricted_dict = {}
for (idx, string) in indexed_strings:
if restricted.search(string):
# storing the string with a restricted char by its index
restricted_dict[idx] = string
# stripping the restricted char temporarily and returning to the list
indexed_strings[idx] = (idx, restricted.sub('', string))
3. Sort the cleaned list of strings by string values, then iterate over the strings once more and replace the stripped strings with their original values:
indexed_strings.sort(key=lambda x: x[1])
# make a new list for the final set of strings
final_strings = []
for (idx, string) in indexed_strings:
if idx in restricted_dict:
final_strings.append(restricted_dict[idx])
else:
final_strings.append(string)
Result: ['ca...t', 'ca..//t', 'cat', 'm/oose', 'moose', 'mouse', 'm.ouse']