title: Regular expressions in java with a variable
body: <p>I have a variable <em>v</em> that possibly appears more than one time consecutively in a string. I want to make it so that all consecutive <em>v</em>s turn into just one <em>v</em>. For example:</p>
  
  <pre><code>String s = "Hello, world!";
  String v = "l";
  </code></pre>
  
  <p>The regex would turn "Hello, world!" into "Helo, world!"</p>
  
  <p>So I want to do something like</p>
  
  <pre><code>s = s.replaceAll(vv+, v)
  </code></pre>
  
  <p>But obviously that won't work. Thoughts?</p>