title: regex to not detect hashtag after a character not space
body: <p>I am trying to scan for hashtags from NSStrings in Objective-C and I am using regex. I made a test status on Facebook to see what are the valid hashtags as it is where I want to pattern my hashtag detection with. My problem is that my regex is still getting hashtags that are not preceded by a space or comes before an alphanumeric. In <code>somethin#idfsjoa</code> the <code>#idfsjoa</code> is being detected as a hashtag when it shouldn't be. I am using <a href="http://regexpal.com/" rel="nofollow noreferrer">regexpal</a> to test my regex.</p>
  
  <p>How do I check if the "#" does not come after a space"? </p>
  
  <p><strong>From Facebook:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/EFNIv.png" alt="enter image description here"></p>
  
  <p><strong>The NSString:</strong></p>
  
  <pre><code>#face #Fa!ce something #iam#1 #1 #919 #jifdosaj somethin#idfsjoa #9#9#98 9#9f9j#9jlasdjl #jklfdsajl34 #34239 #jkf #a #1j3rj3
  </code></pre>
  
  <p>The regular expression I currently have:</p>
  
  <pre><code>(?!\w+)#(\w+)([A-Za-z0]+)
  </code></pre>