title: egrep matching patterns containing 3 repeated digits, not consecutive
body: <p>Use egrep to match lines containing 3 repeated digits, not necessarily consecutive,i.e "3 33", "55 5", "666" or "a6b6c6d". I have an initial thought. </p>
  
  <p>I tried: </p>
  
  <pre><code> egrep '1[^1]*1[^1]*1' test
  </code></pre>
  
  <p>This will recoginize stuff like 1abd1df31. 
  However, I try not to enumerate all digit from 0 to 9. So how can I generalize this using back reference? </p>
  
  <p>Thanks ahead!</p>
  
  <p>NOTE that: there these three digit should be identical. ie. 3aa2aa1aa should not match.</p>