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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:35:08+00:00 2026-06-12T00:35:08+00:00

I got the following string to extract some information from: String: String: String Number;

  • 0

I got the following string to extract some information from:

String: String: String Number;

Right now I’m using the following regex to get the arguments:

(.*?):(.*?):(.*?);$

This way I would get with a Matcher the following output:

group(1) = String
group(2) = String
group(3) = String Number

If I want the number I need to execute another regex on the output of the 3rd group like the following:

([a-zA-Z]* ?([0-9])?$)

Used ont the String String Number this would give me and output like

group(1) = String
group(2) = Number

I thought about combining both steps and use a regex like (.*?):(.*?):([a-zA-Z]* ?([0-9])?);$ on the String: String: String Number;-String. But this does not work and I dont see the reason.

  • 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-12T00:35:09+00:00Added an answer on June 12, 2026 at 12:35 am

    Hwere you go, I added some extra whitespace matching, but this seems to work, you were missing the whitespace between the second : and the following string

     ^(.*?):\s*(.*?):\s*([a-zA-Z]*\s+([0-9])?);$
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got the following string: a:3:{s:3:lat;s:17:49.21103723075132;s:3:lng;s:18:22.330280542373657;s:4:zoom;s:2:17;} And I want to get from it this:
I need to extract information from an LDAP connection string like this one: ldap://uid=adminuser,dc=example,c=com:secret@ldap.example.com/dc=basePath,dc=example,c=com
I've got the following code to extract keywords from a string: var results =
I've got the following query string SELECT VALUE entity FROM Entities AS entity WHERE
I have the following string \u3048\u3075\u3057\u3093 . I got the string from a web
I got the following string : D:\Solutions\TestPlugin\Plugins\DashboardSimu and I'd like to extract : DashboardSimu
I've got text expressions like this: HIUPA:bla1bla1'HIUPD:bla2bla2'HIUPD:bla3bla3'HISYN:bla4bla4' I want to extract the following text
I've got the following JSON string to deserialize: [{application_id:1,application_package:abc},{application_id:2,application_package:xyz}] I'm using DataContractJsonSerializer method. It
I've got following code from Lazy : #include <iostream> #include SDL/SDL.h using namespace std;
Let´s say I´ve got the following xml string: <Item Name=\$Resources:myresource,somestring;\</Item> Now I want to

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.