title: I want to find all words using java regex, that starts with "#" and ends with space or "."
body: <p>This is a sample string </p>
  
  <pre><code>hi #myname, you  got #amount
  </code></pre>
  
  <p>I want to find all words using java regx, 
  that starts with <code>#</code> and ends with space or <code>.</code> 
  example <code>#myname</code>,<code>#amount</code></p>
  
  <p>I tried the following Regex, but it doesn't work.</p>
  
  <pre><code>String regx = "^#(\\s+)";
  </code></pre>