title: How can I use fgets to scan from the keyboard a formatted input (string)?
body: <p>I need to use <code>fgets</code> to get a formatted input from the keyboard (i.e., student number with a format 13XXXX). I know with <code>scanf</code> this could be possible, but I'm not too sure with <code>fgets</code>. How can I make sure that the user inputs a string starting with <code>13</code>?</p>
  
  <pre><code>printf ( "&gt;&gt;\t\tStudent No. (13XXXX): " );
  fgets ( sNum[b], sizeof (sNum), stdin);
  </code></pre>
  
  <p><strong>EDIT:</strong> <code>sNum</code> is the string for the student number. 
  Thanks.</p>