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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:23:10+00:00 2026-06-13T03:23:10+00:00

I have a case where I need to parse a string into several groups

  • 0

I have a case where I need to parse a string into several groups depending on a criteria

For example the below;

01%3A%35r%07%01P%88%00;WAP_GPRS

should be 2 groups

%3A%35r%07%01P%88%00
WAP_GPRS

Notice that I dont care about 01 at the beginning and there can be 0 or more substrings delimited by ; and I need them all in their own group.

Another one;

01%3A%35r%07%01P%88%00;KPN;A23B

should be 3 groups:

%3A%35r%07%01P%88%00
KPN
A23B

Basically, I dont need to care if alpha or numeric comes first. The issue is grouping expressions into their own which can be 0 or more times. Meaning the below

01%3A%35r%07%01P%88%00

should produce also one group of %3A%35r%07%01P%88%00

  • 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-13T03:23:11+00:00Added an answer on June 13, 2026 at 3:23 am

    So I guess you need a regexp analog of split. That would require a repeated capturing group.

    Bad news, some people have looked into a similar problem and haven’t found the right answer:
    https://stackoverflow.com/a/6836024/1665128

    Good news, if you can live with some reasonable limit on the number of groups and you can add some code to identify the empty trailing ones, this may help:

    ([^;]*);?([^;]*)?;?([^;]*)?;?([^;]*)?;?([^;]*)?;?([^;]*)?;?([^;]*)?;?([^;]*)?;?([^;]*)?;?([^;]*)?;?([^;]*)?;?([^;]*)?;?([^;]*)?;?([^;]*)?;?([^;]*)?
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to split a string into several ones. In fact what i need
i have a string that looks like this: /dir/location/test-load-ABCD.p and i need to parse
I have the following string i need to parse to a date: 2012-01-31T08:41:12.5462495+01:00 now
I have a case where I need to select a random item, but I
I have a case where I need to load bitmap from a resource dll
I have a case where I need to update a jqgrid based on some
I have a use case where I need to call a (non-static) method in
I have a very specific case that I need to debug. I need to
I have a use case where I only need to store certain fields to
I have a complicated problem, and I need help. I have a base case,

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.