title: How to regex_replace on reference
body: <p>I have this method:</p>
  
  <pre><code>std::string pluralize(std::string const&amp; word) const {
          std::regex_replace(word, m_pattern, m_replacement);
          return word;
      }
  </code></pre>
  
  <p>But it not working as expected. String is not replaced by given rule. Is possible to do <code>regex_replace</code> on reference and than return this reference of variable?</p>