If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Regular expression does not parse correctly

Hi!

I'm having a hard time making my little parse-function work. I have a CSV file which works just fine when parsing, and i get all the rows i should get. But when i try to use a tab-delimited file instead, i only get 2700 out of 3500 records parsed into the containing datatable.

When parsing a CSV file the following statement is used:

ParseCSV(String inputString,0);

And when parsing a tab-delimited file the following statement is used:

ParseCSV(String inputString,1);

The second parameter simply states if its a tab- or csv-delimited file we're dealing with.

And here comes the function that parses the CSV into a datatable.. i have a hunch that the error is in the regex - im no codeguru in that respect.