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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:50:43+00:00 2026-06-15T09:50:43+00:00

I am trying to process a report from a system which gives me the

  • 0

I am trying to process a report from a system which gives me the following code

000=[GEN] OK {Q=1 M=1 B=002 I=3e5e65656-e5dd-45678-b785-a05656569e}

I need to extract the values between the curly brackets {} and save them in to variables. I assume I will need to do this using regex or similar? I’ve really no idea where to start!! I’m using c# asp.net 4.

I need the following variables

param1 = 000
param2 = GEN
param3 = OK
param4 = 1 //Q
param5 = 1 //M
param6 = 002 //B
param7 = 3e5e65656-e5dd-45678-b785-a05656569e //I

I will name the params based on what they actually mean. Can anyone please help me here? I have tried to split based on spaces, but I get the other garbage with it!

Thanks for any pointers/help!

  • 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-15T09:50:44+00:00Added an answer on June 15, 2026 at 9:50 am

    I would suggest a regular expression for this type of work.

    var objRegex = new System.Text.RegularExpressions.Regex(@"^(\d+)=\[([A-Z]+)\] ([A-Z]+) \{Q=(\d+) M=(\d+) B=(\d+) I=([a-z0-9\-]+)\}$");
    var objMatch = objRegex.Match("000=[GEN] OK {Q=1 M=1 B=002 I=3e5e65656-e5dd-45678-b785-a05656569e}");
    if (objMatch.Success)
    {
        Console.WriteLine(objMatch.Groups[1].ToString());
        Console.WriteLine(objMatch.Groups[2].ToString());
        Console.WriteLine(objMatch.Groups[3].ToString());
        Console.WriteLine(objMatch.Groups[4].ToString());
        Console.WriteLine(objMatch.Groups[5].ToString());
        Console.WriteLine(objMatch.Groups[6].ToString());
        Console.WriteLine(objMatch.Groups[7].ToString());
    }
    

    I’ve just tested this out and it works well for me.

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

Sidebar

Related Questions

I am trying to process 114,000 rows in a dataset (populated from an oracle
I'm just in the process of changing the SalesInvoice Report. One thing I'm trying
I'm trying to process data obtained from a run of diff to an instance
I am trying to process the response from paypal on my page. I found
I am trying to return a 401 error code from a webapp to trigger
I'm getting a report of errors from a production system. I don't have easy
I have the following code: using System; using System.Collections.Generic; using System.Linq; using System.Text; using
I'm trying to decipher a crash report from an app in the app store;
I am trying to process xml files using Hadoop's StreamInputFormat. And I am using
I am trying to process the submitted results for a form, containing data for

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.