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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:58:15+00:00 2026-06-03T01:58:15+00:00

I need to produced a named capture of numbers in a list Example Source

  • 0

I need to produced a named capture of numbers in a list

Example Source Data

This is a comment on line 1
Here is another Comment Line 2
Log ID 1234,5555,2342

using: (?<id>(\d+)*) I will pick up the results of

1
2
1234
5555
2342

But this picks up 1 and 2 in error. I need it to pick up the items after Log ID Only.

I am looking for a regular expression that will return

1234
5555
2342

In a named group called id

  • 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-03T01:58:17+00:00Added an answer on June 3, 2026 at 1:58 am

    If your language supports variable length lookbehinds, you should be able to use the following:

    (?<=Log ID.*)(?<id>\d+)
    

    I also made some modifications to your original regex, because I don’t really see the point of the additional capture group inside of the named capture group, or the nested repetition ((\d+)* is equivalent to (\d*), but I think you actually want \d+ so that it requires you to match at least one digit).

    If you can’t use variable length lookbehinds (most languages), then you will probably need to do this in two steps. First match any lines with ‘Log ID’ then look for numbers in those lines.

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

Sidebar

Related Questions

I need to read data from a legacy database file produced by Visual Basic
I need my webapp to use the class files in the jar I produced
I need to produce an id surrounded by braces ( for example {1234} ).
So basically I need to produce a menu like this in Wordpress: Where the
I have need to produce LINE, BAR, and PIE charts in Rails. I have
Please help! I need to produce a Crystal Report with multiple data columns, but
In some part of my code I need something like this: $product_type = $product->type;
I need help about URL rewriting for image gallery for site. This is problem,
What code need to go here: ,ConventionBuilder.HasMany.Always(x => x.Key.Column( /* what code need to
I need to see an errorcode produced by a SqlException - however, I can't

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.