I\'m building a website with Python/Django. Users submit tags. Each tag can contain multiple words. Each tag has an ID number. I want to make sure tags that are formatted sl
>>> import re >>> re.sub(r'\s+', ' ', 'some test with ugly whitespace') 'some test with ugly whitespace'