title: Why does this regex throw an exception?
body: <p>I am trying to use <code>std::regex_replace</code> in C++11 (Visual Studio 2013) but the regex i am trying to create is throwing an exception:</p>
  
  <pre><code>Microsoft C++ exception: std::regex_error at memory location 0x0030ED34
  </code></pre>
  
  <p>Why is this the case? This is my definition:</p>
  
  <pre><code>std::string regexStr = R"(\([A - Za - z] | [0 - 9])[0 - 9]{2})";
  
  std::regex rg(regexStr); &lt;-- This is where the exception thrown
  
  line = std::regex_replace(line, rg, this-&gt;protyp-&gt;getUTF8Character("$&amp;"));
  </code></pre>
  
  <p>What i want to do: Find all matches inside a string which are of the following format: </p>
  
  <p>"\X99" OR "\999" 
  where X = A-Z or a-z and 9 = 0-9.</p>
  
  <p>I also tried to use the boost regex library, but it also throws an exeception.</p>
  
  <p>(Another question: Can i use the backreference as i am doing in the last line? I want to replace dynamically according to the match)</p>
  
  <p>Thanks for any help</p>