What's the easiest way to filter a stream/reader line-by-line in c# (somewhat like putting sed in the middle of a pipeline). I want to feed an iCalendar file to DDay.iCal but DDay.iCal dies on "VERSION:5.1.1" because it wants a number or number SEMICOLON number (where number is digits (DOT digits)? so the last "." is unexpected).
What I want to do is filter the VERSION: line to something harmless like "VERSION:5.1" so the parser doesn't die.
Update: OK, here's a sample:
BEGIN:VCALENDAR
PRODID:-//SunONE/Calendar Hosting Server//EN
METHOD:PUBLISH
VERSION:5.1.1
X-NSCP-CALPROPS-LAST-MODIFIED:20011208T005613Z
X-NSCP-CALPROPS-CREATED:20010913T223336Z
X-NSCP-CALPROPS-READ:999
X-NSCP-CALPROPS-WRITE:999
Now, the DDay.iCal parser doesn't like "VERSION:5.1.1", so I want to replace that with something harmless like "VERSION:5.1".
The parser interface takes a reader or a stream.
Anyway, I tried to use the code here and it works (reimplementing TextReader on top of a filtered ReadLine).