title: regular expression for finding string between [[ ]] and {{}}
body: <p>How could I find string between <code>[[</code> <code>]]</code>? After searching a answer I find this method below, but I cannot find the regular expression for <code>[[</code> <code>]]</code>, neither for <code>{{</code> <code>}}</code>.</p>
  
  <p>What I want to do is to find e.g. <code>[[abc]]XXXXXXXXXX[[def]]</code>, and save <code>abc</code>, <code>def</code> as a ArrayList.</p>
  
  <pre><code>String s = "[[abc]]XXXXXXXXXX[[def]]";
  Pattern p = Pattern.compile("[[(.*?)]]")
  Matcher m = p.matcher(s);
  if (m.find()) {
      System.out.println(m.group(i)); // =&gt; "abc","def"
  }
  </code></pre>