title: Picking apart a string and replacing it
body: <p>I have been picking my brain lately and can't seem to figure out how to pull the "text" from this string and replace the found pattern with those word(s).</p>
  
  <pre><code>Pattern searchPattern = Pattern.compile("\\[\\{(.+?)\\}\\]"); 
  Matcher matcher = searchPattern.matcher(sb);
  </code></pre>
  
  <p><code>sb</code> is the string that contains a few occurrences of these patterns that start with <code>[{</code> and end with <code>]}</code>. </p>
  
  <pre><code>[{ md : {o : "set", et : _LU.et.v.v }, d : {t : _LU.el.searchtype, l : _LU[_LU.el.searchtype].nfts.l, v : _LU[_LU.el.searchtype].nfts.v}}, { md : {o : "set", et : _LU.et.v.v }, d : {t : _LU.el.topicgroup, l : "Books", v : "ETBO"}}]
  </code></pre>
  
  <p>gets returned as </p>
  
  <pre><code>md : {o : "set", et : _LU.et.v.v }, d : {t : _LU.el.searchtype, l : _LU[_LU.el.searchtype].nfts.l, v : _LU[_LU.el.searchtype].nfts.v}}, { md : {o : "set", et : _LU.et.v.v }, d : {t : _LU.el.topicgroup, l : "Books", v : "ETBO"}
  </code></pre>
  
  <p>Notice the lack of <code>[{</code> and <code>}]</code>. I manage to find the above pattern but how would I find the words <code>set</code> and <code>Book</code> and then replace the original found pattern with only those words. I can search the string if it contains a <code>"</code> via</p>
  
  <pre><code>while (matcher.find()) {
          matcher.group(1).contains("\"");
  </code></pre>
  
  <p>but I really just need some ideas about how to go about doing this.  </p>