title: Python regular expression, print all special character from a string
body: <p>Input :- "ABCD&amp;EFab^cdef12%3450"</p>
  
  <p>Output expected :- &amp;^%</p>
  
  <p>What was tried</p>
  
  <pre><code>import re
  pattern=re.compile(r'[^a-zA-Z0-9]+')
  print(pattern.search("ABCD&amp;EFab^cdef12%3450"))
  </code></pre>
  
  <p>Actual output:- prints only the first occurrence of metacharacter.</p>