title: How can I use sscanf to read a string between brackets?
body: <p>I have some code reading a text file and scanning for words between brackets: '[' and ']'.</p>
  
  <p>When I find the line starting with a '[' I read the string with:</p>
  
  <pre><code>line[64] = "[word]";
  sscanf(line, "[%s]", resource);
  
  printf("%s\n",resource);
  
  ==&gt; word]
  </code></pre>
  
  <p>but I always end up with the string+the bracket. How can i format sscanf to only read the string without the bracket at the end?</p>