I need to create a validation that determines if a string is only made of repeated chars. So, for example it would catch "pp" but not "happy".
So far, I can check for the repeating char using this:
/(.)\1+/.test(value);
How can I change this regex to only catch "pp" and not catch "happy"? Would regex be the best way to do this?