str = "88Bifk8hB8BB8BBBB888chl8BhBfd"
I would like to find all pairs in the string containing "B8" and "8B", they must be found and returned in order.
str should return "8BB8B8B88B"
so far I have tried:
str.scan("B8")
which finds all the "B8" combinations, but this method doesn't allow for another argument for "8B".
This might need a regex search but have tried some different combinations which either don't work or still just return a single combination, i.e. "B8".