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

  • Home
  • SEARCH
  • 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 8659239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:57:59+00:00 2026-06-12T15:57:59+00:00

How to split comma which ignores if the value is enclose to double quotes.

  • 0

How to split comma which ignores if the value is enclose to double quotes.

Data available:

3545,Albert,”Mathias Albert, Lars-Erik Cederman and Alexander Wendt
(eds)”,2010

Should be splitted in an array:

arr(0) = "3545"
arr(1) = "Mathias Albert, Lars-Erik Cederman and Alexander Wendt (eds)"
arr(2) = "2010"
  • 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-12T15:58:00+00:00Added an answer on June 12, 2026 at 3:58 pm

    While using the ADO Text Driver would probably be the best way in the long run, you can use a specific/custom RegExp for a quick & dirty ‘use just once’ script:

    >> Set r = New RegExp
    >> r.Pattern = "^([^,]+),([^,]+),""([^""]+)"",(.+)$"
    >> s = "3545,Albert,""Mathias Albert, Lars-Erik Cederman and Alexander Wendt (eds)"",2010"
    >> Set m = r.Execute(s)
    >> ReDim a(3)
    >> For i = 0 To UBound(a)
    >>     a(i) = m(0).SubMatches(i)
    >> Next
    >> WScript.Echo Join(a, vbCrLf)
    >>
    3545
    Albert
    Mathias Albert, Lars-Erik Cederman and Alexander Wendt (eds)
    2010
    >>
    

    To cope with empty fields, the .Pattern needs some further fiddling.

    If you prefer Split(), something like this:

    >> s = "3545,Albert,""Mathias Albert, Lars-Erik Cederman and Alexander Wendt (eds)"",2010"
    >> ReDim a(3)
    >> q = Split(s, """")
    >> WScript.Echo Join(q, vbCrLf)
    >>
    3545,Albert,
    Mathias Albert, Lars-Erik Cederman and Alexander Wendt (eds)
    ,2010
    >> c = Split(q(0), ",")
    >> WScript.Echo Join(c, vbCrLf)
    >>
    3545
    Albert
    
    >> a(0) = c(0)
    >> a(1) = c(1)
    >> a(2) = q(1)
    >> a(3) = Mid(q(2), 2)
    >> WScript.Echo Join(a, vbCrLf)
    >>
    3545
    Albert
    Mathias Albert, Lars-Erik Cederman and Alexander Wendt (eds)
    2010
    >>
    

    should get you started.

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

Sidebar

Related Questions

I'm looking for an example of how to split-out comma-delimited data in a field
Environment: SQL Server 2005 I have a stored proc which receives comma separated value
I have string which contains every word separated by comma. I want to split
I have a hidden input box from which I'm retrieving the comma-separated text value
I need to split comma delimited string into a second columns I have the
I use the regex [,;\s]+ to split a comma, space, or semicolon separated string.
I need to split a keyword string and turn it into a comma delimited
I want to split alpha-numeric (with space) and non-alpha-numeric by comma in a string.
I need split string by commas and spaces, but ignore the inside quotes, single
How to split the comma separated string with out using loop fo example:- 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.