title: Find repeating characters in a string using regex
body: <p>I'm trying to find a regex which finds 3 repeating characters appearing contiguously in a string. The character set could be alphabet, digit or any special character.</p>
  
  <p>I wanted the first try for alphabet and digits and then extend the expression to include special characters. The ones I tried are. Both of these fail for the string "c2sssFg1". What am I doing wrong here?</p>
  
  <pre><code>(\\w*)\\2{3,}(\\w*)
  
  (\\w*?)(\\w)\\2{3,}(\\w*)
  </code></pre>
  
  <p>I looked at some of the examples on SO and on web but I didn't find the right solution that passes the random strings I test.
  Can someone help me with this?</p>
  
  <p>Thanks.</p>