cgi - cleaning tabs and returns out of textarea

Jason Orendorff jason at jorendorff.com
Mon Jan 28 19:09:19 EST 2002


Glenn Stauffer wrote:
> Thanks for the other suggestions.  I'll have to play around with 
> it more and see what works best.

This works best:

def clean(text):
    return ' '.join(text.split())

Don't use re unless you have to.

## Jason Orendorff    http://www.jorendorff.com/




More information about the Python-list mailing list