I have an app that uses Rx to receive data from a device on the serial port. So I have an IObservable<char>
that I slice and dice into various strings. However, the device vendor added some debugging information that is enclosed in braces:
interesting stuff {debug stuff} interesting stuff
source ---a-b-c-{-d-e-b-u-g-}-d-e-f---| | | | | | | output ---a-b-c---------------d-e-f---|
I need to filter out (discard, ignore) the {debug stuff}
from my character sequence?. Is there a simple way to do that? "When you see this character, ignore elements until you see this other character".
I looked at Until but that would terminate the sequence and I don't want that to happen...