title: How to use preg_replace to remove anything from a certain character on until the end of a string?
body: <p>Hi
  I need to remove all characters from the '_' until the end of the string.</p>
  
  <p>I tried with:</p>
  
  <pre><code>$string = 'merry_christmas';
  
  $string = preg_replace('/_*/','',$string);
  
  echo $string; // I need it to be: 'merry'
  </code></pre>
  
  <p>...but nope.</p>
  
  <p>The idea is to remove the underscore character <code>'_'</code> and all characters to the its right.</p>
  
  <p>Thanks</p>