title: How to use python regex to match words beginning with hash and question mark?
body: <p>This should be easy and this regex works fine to search for words beginning with specific characters, but I can't get it to match hashes and question marks.</p>
  
  <p>This works and matches words beginning a:</p>
  
  <pre><code>r = re.compile(r"\b([a])(\w+)\b")
  </code></pre>
  
  <p>But these don't match:
  Tried:     </p>
  
  <pre><code>r = re.compile(r"\b([#?])(\w+)\b")
  r = re.compile(r"\b([\#\?])(\w+)\b")
  r = re.compile( r"([#\?][\w]+)?")
  </code></pre>
  
  <p>even tried just matching hashes</p>
  
  <pre><code>r = re.compile( r"([#][\w]+)?"
  r = re.compile( r"([/#][\w]+)?"
  
  text = "this is one #tag and this is ?another tag"
  items = r.findall(text)
  </code></pre>
  
  <p>expecting to get:</p>
  
  <pre><code>[('#', 'tag'), ('?', 'another')]
  </code></pre>