I'm trying to detect laughing words like "hahahaha" and "lolololol" in a string.
Currently I'm using the following regex:
^((.*?)|)(\b[ha]|\b[lo])(.*?)$
However, this doesn't work for my purposes. It works, but it also matches words totally unrelated to laughter, such as 'kill', because it simply looks for any word that contains the letters l, o, h, a.
How can I detect laughing words (like "hahaha" or "lololol") in a string?