okay so the quickest solution I could come up with is attached. I just parse everything and then you would build your own logic around selecting the record (segment) that you need. I imagine you can do this with REGEX as well, but I am still a little fuzzy on which segments you are needing to grab. Is that excel syntax that you posted?
Senior Analytics Engineer