title: C++11 simple regex not working with gcc 4.9.1
body: <p>I am having problems with simple regex that I wrote: </p>
  
  <pre><code>std::regex reg = std::regex("(.*)[a-zA-Z]+(.*)");
  </code></pre>
  
  <p>and it works in a simple program like so : </p>
  
  <pre><code>#include &lt;regex&gt;
  #include &lt;exception&gt;
  #include &lt;iostream&gt;
  
  int main(int argc, char *argv[])
  {
    std::regex reg = std::regex("(.*)[a-zA-Z]+(.*)");
  
    std::string s("string");
    if(std::regex_match(s, reg)){
      std::cout &lt;&lt; "MATCH !" &lt;&lt; std::endl;
    }
    return 0;
  }
  </code></pre>
  
  <p>But I have a file that I want to process it with this regex and it doesn't work. File contents: </p>
  
  <pre><code>313801.91 323277.59 861.89
  313770.97 323272.13 868.89
  Start
  End
  313793.19 323290.19 864.89
  </code></pre>
  
  <p>My program: <a href="http://pastebin.com/L0qr00kz" rel="nofollow">full program code</a>; <a href="http://pastebin.com/aHKtJPkj" rel="nofollow">input file</a></p>
  
  <pre><code>  ...
    std::ifstream input;
    std::string cell;
    std::regex reg = std::regex("(.*)[a-zA-Z]+(.*)");
    input.open("a.txt", std::ofstream::in);
    while (std::getline(input, cell))
    {
      // reject the row if there is any text in it
      if( std::regex_match(cell, reg) ){
        // never hit!
        continue;
      }
    }
    ...
  </code></pre>
  
  <p>When I wanted to print it out I got strange result : </p>
  
  <pre><code>cout &lt;&lt; "_____\"" &lt;&lt; cell &lt;&lt; "\"____" &lt;&lt; endl;
  
  "____"Start
  </code></pre>