title: RegEx to match words exactly n characters long but also contain a specific letter?
body: <p>I have long list of lower-case countries (e.g. bali, united kingdom etc)</p>
  
  <p>How do I match all words in it that are exactly 9 letters long and that also contain the letter 'i'?</p>
  
  <p>I've got this so far for the first part:</p>
  
  <pre><code>\b\w{9}\b
  </code></pre>
  
  <p>Thanks for any suggestions.</p>
  
  <p>EDIT:</p>
  
  <p>So I was able to make this:</p>
  
  <pre><code>\b(?=.*i.*)\w{9}\b
  </code></pre>
  
  <p>but it does not work with <code>grep -E '\b(?=.*i.*)\w{9}\b' countries.txt</code>...
  What am I doing wrong?</p>