I have a list from which I need to select up to two elements that follow each occurrence of a marker.
For example, the selected marker is {"b","c"}
and the list is as follows:
lis = {"a",{"b","c"},{"d","e"},{"f","g"},"h","i",{"b","c"},{"j","k"},{"l","m"},{"o"}}
This should give:
res = {{{"d","e"},{"f","g"}},{{"j","k"},{"l","m"}}}
Thanks for any suggestions.