title: Regular Expression using C++
body: <p>I want to create a Regular Expression which will only the input string to contain only [G|y|M|d|D|F|E|h|H|m|s|S|w|W|a|z|Z] so I come up with some code from below:</p>
  
  <pre><code>std::regex Reg = regex("[G|y|M|d|D|F|E|h|H|m|s|S|w|W|a|z|Z]");
  </code></pre>
  
  <p>My problem is that my regex still not correct because my input string can contain other characters with the characters in the above group such as:</p>
  
  <pre><code>std::string myInputString = Gx //correct
  </code></pre>
  
  <p>Which <code>Gx</code> has to be wrong</p>