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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T00:17:02+00:00 2026-06-19T00:17:02+00:00

I have a problem solving this: http://regexone.com/lesson/13 I was trying to do something like:

  • 0

I have a problem solving this: http://regexone.com/lesson/13

I was trying to do something like: (\d+x\d+)

but why it doesn’t work? How do we use “grouping” anyway? Thanks!

input text  required capturing group result
1280x720    1280, 720
1920x1600   1920, 1600
1024x768    1024, 768
  • 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-19T00:17:03+00:00Added an answer on June 19, 2026 at 12:17 am

    The exercise is about capturing groups. The requirement is to capture two sequences of digits separately, and skip the x, like this:

    (\d+)x(\d+)
    

    Your solution, on the other hand, captures the entire input into a single capturing group denoted by parentheses.

    The concept of capturing groups is very important when you need to process individual parts of the input captured by your regular expression, as opposed to processing the entire capture. In the examples at your link, you can grab the first group for the horizontal component of the resolution, and the second group for the vertical component of the resolution. Without two separate capturing groups you would need to find x in your code, and do an additional split.

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

Sidebar

Related Questions

I have this sample page with links that look like buttons: http://www.problemio.com/problems/problem.php?problem_id=251 Most of
I need some help in solving this problem. We have a large amount of
I have problem with http://abfoodpolicy.com/ . In IE 8 and 9 the right sidebar
I have a problem to solve like this. there is time interval, and each
I have this gallery of thumbnails of youtube videos with their title under. http://skitch.com/subzane/bqgqw/demo
I am having difficulties solving this problem using RavenDB. I have these classes. I
I have been working on this site, http://hidden.xx The problem is that the <body>
I have a very big problem solving this issue I have 2 tables first
I tried solving this problem in SPOJ using Booth Algorithm in O(n) time, but
I have a problem that I'm hoping to get some direction in solving -

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.