title: Replacing a special identifier pattern with re.sub in python
body: <p>I am new to regex and have a regex replacement in a <code>re.sub</code> that I can't figure out.</p>
  
  <pre><code>import re
  
  test_cases = [
      "1-Some String #0123",
      "2-Some String #1234-56-a",
      "3-Some String #1234-56A ",
      "4-Some String (Fubar/ #12-345-67A)",
      "5-Some String (Fubar - #12-345.67 A)",
      "6-Some String / #123",
      "7-Some String/#0233",
      "8-Some #1 String/#0233"
      ]
  
  for test in test_cases:
      test = re.sub(r'[/|#][A-Z|a-z|0-9|-]*','', test)
      print(test)
  </code></pre>
  
  <p>The code should print:</p>
  
  <pre><code>1-Some String
  2-Some String
  3-Some String
  4-Some String (Fubar)
  5-Some String (Fubar)
  6-Some String
  7-Some String   
  8-Some #1 String   
  </code></pre>
  
  <p>But, instead I am currently getting this (with 4,5,8 not fully converted):</p>
  
  <pre><code>1-Some String 
  2-Some String 
  3-Some String  
  4-Some String (Fubar )
  5-Some String (Fubar - .67 A)
  6-Some String  
  7-Some String
  8-Some  String
  </code></pre>