title: How to extract a string that is present between two brackets?
body: <p>For example if the string is:  </p>
  
  <blockquote>
    <p>XYZ ::[1][20 BB EC 45 40 C8 97 20 84 8B 10]</p>
  </blockquote>
  
  <p>The output should be: </p>
  
  <blockquote>
    <p>20 BB EC 45 40 C8 97 20 84 8B 10</p>
  </blockquote>
  
  <pre><code>int main()
  {
      char input = "XYZ ::[1][20 BB EC 45 40 C8 97 20 84 8B 10]";
      char output[500];
      // what to write here so that i can get the desired output as: 
      // output = "20 BB EC 45 40 C8 97 20 84 8B 10"
      return 0;
  }
  </code></pre>