Regex to match only letters between two words
Question: Say that I've these two strings:

    
    
    Ultramagnetic MC's
    

and

    
    
    Ultramagnetic MC’s <-- the apostrophe is a different char
    

in Python, but generally speaking, how do I write a regex to match the first
string letters against the second one?

I mean I'd like to match only letters between two strings and ignore special
characters, so I'd be able to match `Ultramagnetic MCs` in a string like this:

    
    
    "Ultramagnetic Mc!s"
    


Answer: I guess you're looking for something like this:

    
    
    import re
    def equal_letters(x, y):
         return re.sub(r'\W+', '', x) == re.sub(r'\W+', '', y)
    
    >>> equal_letters("Ultramagnetic MC's", "Ultramagnetic MC’s")
    True
    >>> equal_letters("Ultramagnetic MC's", "Ultramagnetic Foo")
    False
    

