title: Issue with C++11 regex_search and ECMAScript syntax
body: <p>I am currently working under Ubuntu, with gcc-4.9, experimenting with the C++11  library. There is clearly something that I don't understand with the (default) ECMAScript syntax for regex.</p>
  
  <p>My code is the following:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;exception&gt;
  #include &lt;regex&gt;
  
  using namespace std;
  
  int main() {
  
  string test_str = "this is text containing teeext! Text! Teeeeeeeeeext! This txt should not be matched, nor this Txt";
  string pattern = "([Tt][e]+xt)";
  
  try {
      regex r(pattern, regex_constants::ECMAScript);
      smatch results;
  
      if (regex_search(test_str, results, r))
      {
          cout &lt;&lt; "Found #" &lt;&lt; results.size() &lt;&lt; " results!" &lt;&lt; endl;
          for(unsigned int i = 0; i &lt; results.size(); i++)
          {
                  cout &lt;&lt; results[i].str() &lt;&lt; endl;
          }
      }
      else
          cout &lt;&lt; "no match for " &lt;&lt; pattern &lt;&lt; endl;
  } catch (regex_error &amp;e) {
      cout &lt;&lt; "what: " &lt;&lt; e.what() &lt;&lt; "; code: " &lt;&lt; e.code() &lt;&lt; endl;
  }
  }
  </code></pre>
  
  <p>I'd expect the regex to match "text", "teeext", "Text" and "Teeeeeeeeeext" inside the original string; but the output is:</p>
  
  <pre><code>Found #2 results!
  text
  text
  </code></pre>
  
  <p>I already tried several ways to specify the regex, such as <code>"[T|t]e+xt"</code> and variations, but nothing seems to work. What am I doing wrong?</p>
  
  <p>Thank you for your time.</p>