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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:20:28+00:00 2026-06-11T13:20:28+00:00

Here are 2 records in are sample string, the | indicates a new record

  • 0

Here are 2 records in are sample string, the “|” indicates a new record or row
a “,” separates the pairs and a “=” separates the key from the value. The code below would work if it were a single row or record but not for many rows or in this case 2 rows.
What is needed to have this work so that I get 2 rows with 3 elements each?

string s1 = "colorIndex=3,font.family=Helvicta,font.bold=1|colorIndex=7,font.family=Arial,font.bold=0";
string[] t = s1.Split(new[] { '(', ')' }, StringSplitOptions.RemoveEmptyEntries);

Dictionary<string, string> dictionary =
                 t.ToDictionary(s => s.Split('=')[0], s => s.Split('=')[1]);
  • 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-11T13:20:30+00:00Added an answer on June 11, 2026 at 1:20 pm

    Try this:

    var result = input.Split('|')
                      .Select(r => r.Split(',')
                                    .Select(c => c.Split('='))
                                    .ToDictionary(x => x[0], x => x[1]));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is my code to get Notes from AddressBook. +(NSString*)getNote:(ABRecordRef)record { return ABRecordCopyValue(record, kABPersonNoteProperty);
I am trying to update records with a image button. here is my code:
I need to build a multidimensional array from records retrieved from my database. Here
I have here a code that gets a portion of a record on my
Here is a sample of my query: SELECT ... TRIM(eml.fxeml1) as Email Address FROM
Below is my sample text file { Here is my schema file [Sample File.txt]
I am trying to do something similar to this sample code from Phil Haack
Here's a short sample of my code: def update_records! # Teams. home_team_record = PoolRecord.for_recordable_and_user(event_home_team,
Here is a sample string: --------- SAY WHAAAAT MEDICS: CREW ID: PMD205304 CREW MEMBER
So I copied the sample code from the Moq home page pretty much verbatim,

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.