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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T22:51:41+00:00 2026-06-18T22:51:41+00:00

All- I love regex quite a bit, but when there are multiple types of

  • 0

All-

I love regex quite a bit, but when there are multiple types of parsing I get quite confused.

I’m basically trying to parse data such as this:

{"classs":15,"commondrop":true,"id":7101,"level":1,"name":"7Z",
 "slot":0,"source":[2],"subclass":0, 
 modes: { "mode":4,
          "4": { "count":15862,"outof":36461 }
        },
 count:15862, stack:[1,1]
}, 
{"classs":15,"commondrop":true,"id":62530,"level":1,"name":"7Z",
 "slot":0,"source":[2],"subclass":0,
  modes:{ "mode":4,
          "4":{ "count":13402,"outof":36461 }
        },
  count:13402,stack:[1,1]
},
{"classs":15,"commondrop":true,"id":3300,"level":5,"name":"7Rabbit's Foot",
 "slot":0,"source":[2],"subclass":0,
  modes:{"mode":4,
         "4":{ "count":1,"outof":36461 }
        },
  count:1,stack:[1,1] 
}
]});

Since there are sub brackets (the { and }) I’m not entirely sure how to ONLY get what is in the outter bracket. So I would just want to get this out of it:

"classs":15,"commondrop":true,"id":7101,"level":1,"name":"7Z","slot":0,"source":[2],"subclass":0,modes:{"mode":4,"4":{"count":15862,"outof":36461}},count:15862,stack:[1,1]

(which I could then parse further and break it down more)

Is this even possible with regex? I started off trying something like \{"classs"(.*?)\},{ but it misses some of the data.

  • 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-18T22:51:42+00:00Added an answer on June 18, 2026 at 10:51 pm

    counting brackets is not possible with regular expressions, because these aren’t regular languages. The solution will be to use i.e. a Parsing Expression Grammar implementation instead of a RegEx.

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

Sidebar

Related Questions

all. We're trying to get some intersect collisions working, but the problem experience is
I love/hate the regex because of usefulness/hardness. (I don't why but I can't construct
We all love the inconvience of 2 ways binding. But how to easily reset
Trying to parse a csv file that has all the data wrapped in double
I'm trying to get a hold of the data returned from getJSON, but I
We all know and love the NSDateFormatter . Is there anything similar to format
OK I love Python's zip() function. Use it all the time, it's brilliant. Every
I'd really love your help with this deciding whether the language of all words
What I love about awk is you can fetch all the lines from a
We all love our keyboard shortcuts and on a Windows machine two of my

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.