title: REGEX: How to match string that followed by space and contains specific char/symbol
body: <p>i have the following string </p>
  
  <pre><code>string string#string#string string
  string$string (string) string string string
  string string#gulaen#string string-stringan 
  (string) string#string#string$string string string (string)
  string string string$string#string$string#string string
  string string#string$string#string string
  string#string$string#string string
  </code></pre>
  
  <p>with this pattern <code>/\b(\w+[\#\$])\w+\b/</code> i try to match string that followed by space and contains # and $ but i can't get the result that i want. i get the folowing result</p>
  
  <p><a href="https://i.stack.imgur.com/OnNKh.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OnNKh.jpg" alt="enter image description here"></a></p>
  
  <p>what i expect is to match the following highlighted blue:</p>
  
  <p><a href="https://i.stack.imgur.com/OHUbj.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OHUbj.jpg" alt="enter image description here"></a></p>
  
  <p>how to achieve that? thanks</p>