title: sscanf with colon delimeter
body: <p>I'm a newbie to C Programming. I want to extract the values out of the input buffer string. I saw a couple of examples for <code>sscanf</code> and it works with space delimiter but it doesn't work with colons or comma.</p>
  
  <p>I tried to use some regex in sscanf but still doesn't seems to work.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main() {
  
  char buffer[] = "T:192.164.7.1:22:user:pass:empty:test.txt";
  char cmdChar;
  char ipAddress[100];
  int port;
  char username[100];
  char password[100];
  char folder[100];
  char fileName[100];
  char fileExtension[100];
  
  sscanf(buffer, "%1c:%[^:]%d:%s:%s:%s:%s.%s", cmdChar, ipAddress, &amp;port, username, password, folder, fileName, fileExtension);
  printf("%c \n\n", cmdChar);
  
  }
  </code></pre>
  
  <p>Tried to print the first character <code>cmdChar</code> but it returns as <code>NULL</code>. Can someone point me out what am I doing wrong. Thanks!</p>