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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:08:28+00:00 2026-06-10T23:08:28+00:00

Hello I have a question about matching groups based on the following regular expression

  • 0

Hello I have a question about matching groups based on the following regular expression

static string partPattern = @"^(?<Key>\w+)\s*(?<Value>.*)$";

Sample Data as following:

   TEST_REPLICATE
    {
        REPLICATE_ID            1986
        ASSAY_NUMBER            877
        ASSAY_VERSION           4
        ASSAY_STATUS            "Research"
            }

I am able to retrieve values correctly and if values are NULL, it works correctly as well. What I am trying to do is to also retrieve a value for instance the last one module which is in double quotes. I am not really sure if i am doing it correctly, would this be the correct regex for the above scenario, I just added quotes before w. Please correct, thanks

  static string partPattern = @"^(?<Key>\"w+)\s*(?<Value>.*)$";
  • 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-10T23:08:29+00:00Added an answer on June 10, 2026 at 11:08 pm

    Not sure where your problem is. This works for me:

    \s*(?<Key>[^\s]+)\s*(?<Value>.*)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a question about type casting. I have the following JSON String: {server:clients,method:whoIs,arguments:[hello]}
Hello i have some question about java. here is my code: public static void
Hello fellow programmers. I have a question about static and the dot operator using
I have a question about the following statement in tcl set hello [format %x
Hello this is may first question and I have found so far the following
I have the following regexp: (?P<question>.+(?<!\[\[)) It is designed to match hello world! in
Hello I am new to python and have a question about the best/pythonic way
Hello i have a question about servlet calling another servlet I have a main
Hello wonderful stackoverflow users. I have a question about url loading. In many browsers
Hello I have one question about using genetic in correct way. please look at

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.