title: c++ regex match beginning of line
body: <p>I have a string that looks like this</p>
  
  <pre><code>text here++ text
  + text text
  + text
  text text
  </code></pre>
  
  <p>I want to replace + with - but only at the the beginning of the lines so that it looks like this:</p>
  
  <pre><code>text here++ text
  - text text
  - text
  text text
  </code></pre>
  
  <p>I'm trying a regex like this:</p>
  
  <pre><code>string text = "the-above-text";
  regex reg("^\\++.*$");
  text = regex_replace(text, reg, "-");
  </code></pre>
  
  <p>but this ^ matches the beginning of the text, not the beginning of the line.</p>
  
  <p>I've been googling for hours and it seems there's no way to make the engine to work in multi line mode.</p>
  
  <p>Is there a way I can do this? Or any newer c++ standard that supports multi-line ^ and $? I'm using g++</p>
  
  <p>Thanks!</p>