title: How do I display data from the beginning of a file until the first occurrence of a regular expression?
body: <p>How do I display data from the beginning of a file until the first occurrence of a regular expression?</p>
  
  <p>For example, if I have a file that contains:</p>
  
  <pre><code>One
  Two
  Three
  Bravo
  Four 
  Five
  </code></pre>
  
  <p>I want to start displaying the contents of the file starting at line 1 and stopping when I find the string "B*". So the output should look like this:</p>
  
  <pre><code>One
  Two
  Three
  </code></pre>