I have a file with a little over a million lines.
{<uri::rdfserver#null> <uri::d41d8cd98f00b204e9800998ecf8427e> <uri::TickerDailyPriceVolume> "693702"^^<xsd:long>}
{<uri::rdfserver#null> <uri::d41d8cd98f00b204e9800998ecf8427e> <uri::TickerDailyPriceId> <uri::20fb8f7d-30ef-dd11-a78d-001f29e570a8>}
Each line is a statement.
struct Statement
string C;
string S;
string P;
string O;
string T;
Currently I'm using a TextReader in a while loop and parsing each line with a regular expression:
Regex lineParse = new Regex(@"[^<|\""]*\w[^>\""]*", RegexOptions.Singleline | RegexOptions.Compiled);
It takes quite awhile to do this parsing and I'm hoping someone can point me to a more efficient parsing strategy.
Some lines have 5 matchs and some 4. Here is how each line is parsed:
{<uri::rdfserver#null> <uri::d41d8cd98f00b204e9800998ecf8427e> <uri::TickerDailyPriceVolume> "693702"^^<xsd:long>}
Statement()
C = uri::rdfserver#null
S = uri::d41d8cd98f00b204e9800998ecf8427e
P = uri::TickerDailyPriceVolume
O = 693702
T = xsd:long
{<uri::rdfserver#null> <uri::d41d8cd98f00b204e9800998ecf8427e> <uri::TickerDailyPriceId> <uri::20fb8f7d-30ef-dd11-a78d-001f29e570a8>}
Statement()
C = uri::rdfserver#null
S = uri::d41d8cd98f00b204e9800998ecf8427e
P = uri::TickerDailyPriceId
O = uri::20fb8f7d-30ef-dd11-a78d-001f29e570a8