title: Matched grouped - What is the difference between \1 on Search and \1 on Replace
body: <p>I've seen very often 2 cases of match groups for <code>\1</code>, for example:</p>
  
  <ul>
  <li>Search: <code>(?)(\w+d+).*\1</code> </li>
  <li>Replace: <code>Leave Empty</code></li>
  </ul>
  
  <p>and</p>
  
  <ul>
  <li>Search: <code>(?)(\w+d+).*</code></li>
  <li>Replace: <code>\1</code></li>
  </ul>
  
  <p>In which cases I can use <code>\1</code> on search, and in which cases I can use <code>\1</code> on replace?</p>