Regular expression for finding more than 4 consecutive repeating characters in a string
<p>I want to find out more than 4 consecutive repeating characters within a string. e.g. <code>(string is lowercased)</code></p>

<pre><code>bbaaaaa ---&gt; yes (5 consecutive a's)
bbaa   ---&gt; no
aabbbbbccdddddee ---&gt; yes (5 consecutive b's)
</code></pre>

<p>One possible solution is to loop over <code>a</code> to <code>z</code> and use <code>character{4,}</code> where <code>character</code> can be anyone from <code>a</code> to <code>z</code>.</p>

<p>Is there any one liner for it?</p>

<p>I apologize if its duplicate</p>