As title, is there a way in PHP, with preg_match_all to catch all the repetitions of chars group? For instante catch
- hahahaha
- jajajaj
- hihihi
It's fine to catch repetition of any char, like abababab, acacacacac. Also, is there a way to count the number of repetition?
The idea is to catch all this "forms" of smiling on social media. I figured out that there are also other cases, such as misspelled instances like ahahhahaah (where you have two consecutive a or h). Any ideas?