Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9300413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T22:46:27+00:00 2026-06-18T22:46:27+00:00

I am trying to parse a file using regex split, it works well with

  • 0

I am trying to parse a file using regex split, it works well with the '\t' character but some lines have the '\t' inside a field instead of acting as the delimiter.

Like :

G2226   TEST 1  C   29  Internal Head Office    D   Head Office ZZZ Unassigned  10910   10/10/2011  11/10/2011  10/10/2011  11/10/2011  "Test call  Sort the customer out some data. See the customer again tomorrow to talk about Prod     "   Mr ABC          Mr ABC                  Mr  ABC Mr  ABC Credit Requested    BDM Call    Internal Note   10

This part has 2 tabs I wish were ignored :

"Test call  Sort the customer out some data. See the customer again tomorrow to talk about Prod\t\t"

The good thing is, they are included in double quotes, but I cannot work out how to ignore them, any ideas?

Edit:

My goal is to get 36 columns, some columns may come out more after a Regex.Split(lineString,'\t') using '\t' because they include '\t' characters inside some of the fields. I would like to ignore those ones. The one above comes out to 38 cols, which is rejected by my datatable as the header is only 36 cols, I would like to solve this problem.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T22:46:29+00:00Added an answer on June 18, 2026 at 10:46 pm

    If you have a simple CSV file, then regex split is usually the easiest way to process it.

    However, if your CSV file contains more complex elements, such as quoted fields that contain separator characters or newlines, then this approach will no longer work. It is not a trivial matter to correctly parse these types of files, so you should use a library when possible.

    The answers to this question give several options for C# libraries that can read a CSV file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to parse an XML file using boost's property tree, but
I am trying to parse an XML file with python using lxml, but get
I'm trying to parse an XML file using PHP, but I get an error
I am trying to parse a text file using regex. I am using notepad++
I am trying to parse a plain text file using Tika but getting inconsistent
I am trying to parse a json file using jquery getJson. I have no
I am trying to parse a log file using regex, the problem is as
I am trying to parse some text using boost. i have looked at the
I am trying to parse an XML file using NSXMLParser, but the method [parser
I am trying to parse Xml file using PHP but whenever i runs the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.