title: How to make a Palindrome with a sed command?
body: <p>I'm trying to find the code that searches all palindromes in a dictionary file</p>
  
  <p>this is what I got atm which is wrong : </p>
  
  <pre><code>sed -rn '/^([a-z])-([a-z])\2\1$/p' /usr/share/dict/words
  </code></pre>
  
  <p>Can somebody explain the code as well.</p>
  
  <p>Found the right answer.</p>
  
  <p><code>sed -n '/^\([a-z]\)\([a-z]\)\2\1$/p' /usr/share/dict/words</code></p>
  
  <p>I have no idea why I used <code>-</code>
  I also don't have an explenation for the <code>\</code> ater each group</p>