How can I find occurences of same subsequent characters in a string with a regular expression or function?
Example:
I am leet and I have a three pizzas. That noob right there has only one pizza. Poor boy.
You can use a backreference:
/(.)\1/
Change \1
to \1+
if you want to find sequences of length two or more.
Note that the syntax can vary depending on the regular expression engine you are using.