title: Perl - Match string between two colons
body: <p>My string looks like this</p>
  
  <pre><code>important stuff: some text 2: some text 3.
  </code></pre>
  
  <p>I want to only print "important stuff". So basically I want to print everything up to the first colon. I'm sure this is simple, but my regex foo is not so good.</p>
  
  <p>Edit: Sorry I was doing something stupid and gave you a bad example line. It has been corrected.</p>