I'm trying to match a string that is a GET from the URL, to a field in the database that is the same string without any punctuation or spaces. For example:
URL: http://www.mysite.com/JohnBSmith/
And the string I'm trying to match in the database is: "John B. Smith"
Can I do this with regex? One catch is that I don't know how many punctuation marks or spaces there will be.
How do I do this with Django? I want to write this in the form:
myVariable = MyModel.objects.filter(foo=bar)
Thank you in advance.