title: Regular expression for a double word
body: <p>I am trying to write a regular expression that will detect a word that is repeated twice, e.g.,  <code>greatgreat</code> or <code>appleapple</code>. I could not find any way to do this, after hours of trying I am posting it here to see if anyone can help.</p>