I have a .txt file (.csv delimeted by .
How can I count semicolons in each row?
Code: Select all
field1;field2;field3;
field1;field2;field3;
field1;field2;field3;
field1;field2;
field1;field2;field3;
In this way I would be able to tell if there is a row in a file that is corrupt (wrong) - wrong number of semicolons.
Let's say that there must be 3 semicolons in a row. If there is a row with different numbers of semicolons (less than 3 or more than 3) I want this row to be displayed.
Any ideas? I don't know where to start.
Thanks.
Saso