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 8920065
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T06:10:20+00:00 2026-06-15T06:10:20+00:00

I have a CSV that is created and doesn’t quote out text comments from

  • 0

I have a CSV that is created and doesn’t quote out text comments from a column and includes new lines.

Regular expression for csv with commas and no quotes is a similiar question but he doesn’t have another line or additional columns to parse through.

A line of text in the csv can look like this:

    1, 15231, 123123, 1231, word word word, YYYY-MM-DD HH:mm:ss.sss, 13453, **This would be the section with any character for users to communicate and the db stores and 
new lines to record communication**, YYYY-MM-DD HH:mm:ss.sss, User name, 12412413, 01231231, 123,12,,*ASTERIX USED*, YYYY-MM-DD HH:mm:ss.sss

Then another new line and something like about would parse through,

So far I’ve tried this

/(\d+?),(\d+?),(\d+?),(\d+?),(.+?),(.+?),(.+?),(.+?),(.+?),(.+?),(.+?),(.+?),(.+?),(.+?),(.+(?=,\d{4})),

But I can’t seem to get past the instances if there are date references in the comments section of the csv.

Farely new to regex and the (?=) is new to me as I had to go beyond simple regex patterns.

  • 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-15T06:10:21+00:00Added an answer on June 15, 2026 at 6:10 am

    If you know the exact number of fields that there should be, then you can use the following method:

    • For each “normal” field that will not contain commas, use [^,]*
    • For the user entered field which may contain commas, use .*
    • Separate each field with a comma

    For example if you have five total fields and the third is entered by the user, you would use the following regex:

    ([^,]*),([^,]*),(.*),([^,]*),([^,]*)
    

    Example: http://www.rubular.com/r/E6785bWW0R

    If the user entered field may contain line breaks, make sure you enable the option so that . matches line break characters (often s, or a constant like DOTALL, in some languages you can prefix your regex with (?s)). Alternatively, just replace .* with [\s\S]*, which will match anything regardless of options used.

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

Sidebar

Related Questions

Ok I have created a PHP script that prints out data from a .csv
I have a dataset that is dynamically created from a csv file. What I
I have a Python script that reads through a text csv file and creates
I have a csv that looks like this: blah,blah, blah, blah ect, ect,column 3
I have received a CSV that has been converted/compressed/compacted into a SAV file from
I have created CSVReader and I am trying to read csv file from assets
I'm having a bit of trouble exporting a csv file that is created from
I have a PHP app that creates a CSV file which is forced to
I have an exe that already creates a csv file. If I save the
I have CSV files that have multiple columns that are sorted. For instance, I

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.