title: preg_match_all after hash tag before next hash tag in a string
body: <p>I want to find (if they exist) any hash tags and get the first co-occurrence of each tag plus the text after it but before the next tag if another exists.</p>
  
  <p>*Not all message strings carry a hash tag!</p>
  
  <p>Here is what I am trying to do:</p>
  
  <p><strong>List of possible string examples sent to script:</strong></p>
  
  <p>1) $message = 'Added some new stuff';</p>
  
  <p>2) $message = '<strong>#BALANCE</strong> balanced movement of X';</p>
  
  <p>3) $message = '<strong>#CHANGE</strong> some log text <strong>#FIX</strong> some other log text';</p>
  
  <p>$num = prereg_match_all('@?????@', $message, $matches);</p>
  
  <p>This is the array structure result I am aiming for from the matches:</p>
  
  <p><strong>Result of Example 1)</strong></p>
  
  <pre><code>(
  [0] =&gt; Array
      (
          [0] =&gt; Added some new stuff
      )
  )
  </code></pre>
  
  <p><strong>Result of Example 2)</strong></p>
  
  <pre><code>(
  [0] =&gt; Array
      (
          [0] =&gt; balanced movement of X
          [1] =&gt; #BALANCE
      )
  )
  </code></pre>
  
  <p><strong>Result of Example 3)</strong></p>
  
  <pre><code>(
  [0] =&gt; Array
      (
          [0] =&gt; some log text
          [1] =&gt; #CHANGE
      )
  [1] =&gt; Array
      (
          [0] =&gt; some other log text
          [1] =&gt; #FIX
      )
  )
  </code></pre>
  
  <p>Things driving me nuts trying to find decent documentation on REGEX</p>