I hope that my question has not already been posed by someone else, since I tried to look almost everywhere in the site but I couldn\'t manage to find an answer.
My
You have to use looakahead and count the number of matches
looakahead
(?=beta|alpha)
Not tested in perl but should work
works here