I have a string like
“GGACATCGCGGTGGATCGAC”
How can I find all substrings that contain, for example, three Gs in any order?
For this string, it would be ‘GCGG’ or ‘GTGG’, or ‘GGACATCG’.
Also need to find such substrings for several letters, like, substrings with two Gs and one C (‘GGAC’, ‘GGATC’, ‘CGG’)