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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:28:44+00:00 2026-05-29T11:28:44+00:00

Sorry for the newbie question…It seems the parenthesis provide two different functions in a

  • 0

Sorry for the newbie question…It seems the parenthesis provide two different functions in a regex. One is for grouping but the other is for extracting strings (eg. a(.*)z to extract the string between the ‘a’ and ‘z’ characters). How would you do a grouping inside of an expression where you want to do an extraction? Wouldn’t the regex interpreter just interpret both sets of parenthesis as extractions? How would you include a grouping operation within a regex where you are doing an extraction? Hopefully that makes sense.

  • 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-05-29T11:28:47+00:00Added an answer on May 29, 2026 at 11:28 am

    Depends on the regex flavor (language), but in most flavors that matter(*), (?: starts a “non-capturing group”, and ) ends it as usual. I.e.

    (?:abc|cba)(.+)
    

    Will match “abc” or “cba” followed by 1 or more arbitrary characters, and only those arbitrary characters will be captured (“extracted”).

    *) When I say “most that matter”, that means anything except POSIX and GNU. I.e. .NET, Javascript, Java, Python, Ruby, Perl, PHP etc. The one important flavor where it’s not supported is XPath (and XML Schema).

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

Sidebar

Related Questions

Sorry fot his newbie question. But I really need a start on this one.
I'm sorry if this is a newbie question, but it seems I don't get
sorry for a newbie question.. but Service by it's defenision meaning the same as
first of all, sorry if that question is dumb but I´m a total newbie
sorry for the newbie question but, I'm new to programming.. I want to check
Sorry for the newbie question, but I can't seem to figure this out. I
Sorry for the newbie question but still very new to Ruby and Mongo. Not
Sorry for the newbie question, but i cannot find an answer to it. I
Sorry for this newbie question but I cannot figure how I can do this..
Im sorry if this is a newbie question but I'm getting confuse about how

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.