title: Find and replace characters in brackets
body: <p>I have a string kind of:</p>
  
  <pre><code>String text = "(plum) some other words, [apple], another words {pear}.";
  </code></pre>
  
  <p>I have to find and replace the words in brackets, don't replacing the brackets themselves.</p>
  
  <p>If I write:</p>
  
  <pre><code>text = text.replaceAll("(\\(|\\[|\\{).*?(\\)|\\]|\\})", "fruit");
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>fruit some other words, fruit, another words fruit.
  </code></pre>
  
  <p>So the brackets went away with the fruits, but I need to keep them.</p>
  
  <hr>
  
  <p>Desired output:</p>
  
  <pre><code>(fruit) some other words, [fruit], another words {fruit}.
  </code></pre>