I have a text file and I would like to parse it using regular expression.
how can i extract the text block between “Entry #” to the empty line before the next “Entry #”
GmtOffset=120
GmtExistFlag=0
LocalTimeFlag=0
Entry #1
EventType=1
FieldType=256
FieldValue=12-05-2010, 11:00:00
FieldType=512
FieldValue=12-05-2010, 11:30:00
FieldType=1
FieldValue(3)=Jku
Entry #2
EventType=1
FieldType=256
FieldValue=15-05-2010, 06:00:00
FieldType=512
FieldValue=15-05-2010, 06:30:00
FieldType=1
FieldValue(3)=Lsh
FieldType=1024
FieldValue=15-05-2010, 05:45:00
FieldType=65536
FieldValue=1
Entry #3
EventType=4
FieldType=1
FieldValue(4)=STYL
FieldType=1024
FieldValue=13-05-2010, 11:00:00
FieldType=65536
FieldValue=1
FieldType=2097152
FieldValue=2
FieldType=8388608
FieldValue=-2147483648
How to ?
Thanks
While I concur with the solution by @ie, I think that solution will overlook the problem of the number following the
Entry #. In that case Regex.Split will work.