Python Regex expression for extracting hashtags from text
<p>I'm processing some tweets I mined during the election and I need to a way to extract hashtags from tweet text while accounting punctuation, non-unicode characters, etc while still retaining the hashtag in the outputted list.</p>

<p>For example, the orignal text from a tweet looks like:</p>

<p>I'm with HER! #NeverTrump #DumpTrump #imwithherðŸ‡ºðŸ‡¸ @ Williamsburg, Brooklyn</p>

<p>and when turned into a string in python (or even put into a code block on this site), the special characters near the end are changed, producing this:</p>

<pre><code>"I'm with HER! #NeverTrump #DumpTrump #imwithherdY\xd8\xa7dY\xd8, @ Williamsburg, Brooklyn"
</code></pre>

<p>now I would like to parse the string to be turned into a list like this:</p>

<pre><code>['#NeverTrump','#DumpTrump', '#imwithher']
</code></pre>

<p>I'm currently using this expression where str is the above string:</p>

<pre><code>tokenizedTweet = re.findall(r'(?i)\#\w+', str, flags=re.UNICODE)
</code></pre>

<p>however, I'm getting this as output:</p>

<pre><code>['#NeverTrump', '#DumpTrump', '#imwithherdY\xd8']
</code></pre>

<p>How would I account for 'dY\xd8' in my regex to exclude it?
I'm also open to other solutions not involving regex.</p>