title: Regex character repeats n or more times in line with grep
body: <p>I need to find the regex expression to find a character that repeats 4 or more times with grep.</p>
  
  <p>I know that the expression is {n,}, so if I need to find lines, for example, when the character "g" repeats 4 or more times, in theory with grep man page is:</p>
  
  <pre><code>grep "g{4,}" textsamplefile
  </code></pre>
  
  <p>But doesn't work. Any help?</p>
  
  <p>The character could have other letters. For example, a valid match is:</p>
  
  <p><strong>g</strong>example<strong>g</strong>of<strong>g</strong>valid<strong>g</strong>match<strong>g</strong></p>
  
  <p><strong>g</strong>other<strong>g</strong>valid<strong>g</strong>match<strong>g</strong>is<strong>g</strong>here<strong>g</strong></p>
  
  <p><strong>gggg</strong>other</p>