title: How to remove all special char in string by python?
body: <p>I want to remove all special char such as '|', '.' or '$' in the string.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>string= '#$#&amp;^&amp;#$@||||123515'
  re.sub(r'[^a-zA-Z0-9]', '', string)
  print(string)
  </code></pre>
  
  <p>the output: </p>
  
  <pre><code>#$#&amp;^&amp;#$@||||123515
  </code></pre>
  
  <p>I know this regex means removing everything but number, a-z and A-Z.</p>
  
  <p>But it fails to remove all special char.</p>
  
  <p>Can somebody tell me why? Thank you! :)</p>