title: regular expression to replace two (or more) consecutive characters by only one?
body: <p>In java, which regular expression can be used to replace these,
  for example:</p>
  
  <p>before:
  aaabbb
  after:
  ab</p>
  
  <p>before:
  14442345 
  after:
  142345</p>
  
  <p>thanks!</p>