title: Trying to read command line switches with regex
body: <p>So I am trying to read input from a command line in the format fileusage.exe [switches] [folder] where the switches can be typed in format as long as they start with a -. for example -c+j#R.</p>
  
  <pre><code> int main(int argc, char *argv[])
  
  {
      cout.imbue(locale(""));
  
  vector&lt;char&gt; theSwitches;
  regex switches(R"reg(\-(c|\+|j|#|w|s|x|r|R|S|v|h)$)reg");
  
  if (argc &gt; 1)
  {
  
      // search through the command line args and find matching switches
      if (regex_match(argv[1], switches))
      {
          theSwitches.push_back(argv[1]);
      }
      else
          cout &lt;&lt; "Didnt find the switches" &lt;&lt; endl;
  
  }
  </code></pre>