title: How to match line-break in c++ regex?
body: <p>I tried the following regex:</p>
  
  <pre><code>const static char * regex_string = "([a-zA-Z0-9]+).*";
  
  void find_first(const std::string str);
  
  int main(int argc, char ** argv)
  {
          find_first("0s7fg9078dfg09d78fg097dsfg7sdg\r\nfdfgdfg");
  }
  void find_first(const std::string str)
  {
          std::cout &lt;&lt; str &lt;&lt; std::endl;
          std::regex rgx(regex_string);
          std::smatch matcher;
          if(std::regex_match(str, matcher, rgx))
          {
                  std::cout &lt;&lt; "Found : " &lt;&lt; matcher.str(0) &lt;&lt; std::endl;
          } else {
                  std::cout &lt;&lt; "Not found" &lt;&lt; std::endl;
          }
  }
  </code></pre>
  
  <p><strong><a href="http://coliru.stacked-crooked.com/a/1a557ab3dc5a4897" rel="noreferrer">DEMO</a></strong></p>
  
  <p>I expected the regex will be completely correct and the group will be found. But it wasn't. Why? How can I match the line-break in c++ regex? In Java it works fine.</p>