title: Regular Expression to extract words, names, hashtags, and phrases from tweets
body: <p>I'm working with twitter feeds to sort out words, names, hashtags and phrases in various tweets.</p>
  
  <p>I'm assuming names are several words together that start with capital letters, hashtags are # followed by everything but spaces, phrases are things within quotes, and words are words.</p>
  
  <p>It would also be nice to pull out any links too, but that is not necessary.</p>
  
  <p>I would like to use Regex, but if there is a better solution, I would like to know.</p>
  
  <p>An example Twitter post:</p>
  
  <blockquote>
    <p>You know you watch a lot of Wes Anderson films when you see his new trailer and think, "Wait, where's the Futura font?" #MoviesILike <a href="http://bit.ly/HklUk" rel="nofollow">http://bit.ly/HklUk</a></p>
  </blockquote>
  
  <p>would split <code>Wes Anderson</code>, <code>Wait, where's the Futura font?</code>, <code>#MoviesILike</code>, and all of the words</p>
  
  <p>The Regex I'm playing with right now is:</p>
  
  <pre><code>Regex _wordRegex = new Regex(@"(?:\""(?&lt;Item&gt;.*?)\"")|(?&lt;Item&gt;(?:[A-Z][a-z]*?[.\s])+)|(?&lt;Item&gt;#\S+)|(?&lt;Item&gt;\w+)");
  </code></pre>