title: I want to replace a string with repeating char characters
body: <p>Given regex I want to replace that part of string with multiple &quot;.&quot; character based on its size.</p>
  <p>I tried something like this:</p>
  <pre><code>  s =  s.replaceAll(matcher.group(1),&quot;.&quot; * matcher.group(1).length() );
  </code></pre>
  <p>but the &quot;.&quot; * length gives an error any way I can fix that.</p>