title: Find matching input and returning the matching input and also the unmatching input
body: <p>I'm am looping through keyboard input to find a match such as: <code>int A = 89;</code>.
  Then return the input as tokens like:
  <code>int</code>, <code>A</code>, <code>=</code>, <code>89</code>, <code>;</code>.</p>
  
  <p>I have already tried looping through the input and using regex_match to check the tokens.</p>
  
  <pre><code>if (ch == ' ') {
          while (ch == ' ') {
              cin.get(ch);
          }
      }
  
      while (ch != ' ') {
          token += ch;
          cin.get(ch);
      }
  
      if (regex_match(token, regex("= | ; | int | float | A | B | C | D | E | [0-9]+ | [0-9]+\.[0-9]+"))){
          return token;
      }
      else {
          return token + ": Error: Unrecognizable token";
      }
  </code></pre>