Python: Strip everything but spaces and alphanumeric

Posted by j00niner on Stack Overflow See other posts from Stack Overflow or by j00niner
Published on 2010-05-06T08:04:18Z Indexed on 2010/05/06 8:08 UTC
Read the original article Hit count: 108

Filed under:

I have a large string with brackets and commas and such. I want to strip all those characters but keep the spacing. How can I do this. As of now I am using

strippedList = re.sub(r'\W+', '', origList)

© Stack Overflow or respective owner

Related posts about python