title: How to split and get value in string
body: <p>Hi i have a string like <code>"john ka [12345678]"</code> and <code>"james james [12121212]"</code> etc.
  How to split sting and get value inside "[]".
  Expected output is <code>12345678</code> and <code>12121212</code> like this</p>
  
  <p>I tried split method.</p>
  
  <pre><code>string1 = "john ka [12345678]"
  string2 = "james james [12121212]"
  // etc.
  </code></pre>
  
  <p>Output should be 
  12345678 and 12121212</p>