title: Matching and removing twitter hashtags in a string
body: <p>I need to remove the # character from hashtags only if the hashtag is anywhere but at the end of the string. Examples:</p>
  
  <blockquote>
    <p>I'm going to #Disney this month! #WDW</p>
    
    <p>I'm going to #Disney this month. #WDW #Orlando</p>
    
    <p>I'm going to #Disney this month #WDW #Orlando</p>
  </blockquote>
  
  <p>They need to be converted to:</p>
  
  <blockquote>
    <p>I'm going to Disney this month!</p>
    
    <p>I'm going to Disney this month.</p>
    
    <p>I'm going to Disney this month</p>
  </blockquote>
  
  <p>This code will remove all # characters:</p>
  
  <pre><code>function remove_hashtags($string){
      $result = preg_replace('/#([\w-]+)/i', '$1', $string);
      return $result;
  }
  </code></pre>
  
  <p>...but before that, the hashtag (or group of hashtags) at the end of the string need to be removed.</p>