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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T20:37:17+00:00 2026-05-29T20:37:17+00:00

I am struggling with a nice challenge to match two same numbers separately, with

  • 0

I am struggling with a nice challenge to match two same numbers separately, with a regex.

See here the list I am trying to match separately.

1,680,000,0001,680,000,000
3,350,0003,350,000
110,000110,000
11,100,00011,100,000
550,000550,000
1,0001,000
250250
49,50049,500
165,000165,000
49,50049,500
3,350,0003,350,000
165,000165,000
550,000550,000
550,000550,000
33,10033,100
18,10018,100
450,000450,000

Take for example 550,000550,000, that’s twice 550,000 or 250250 that’s twice 250. I want to match for example 550,000 and 250.

I have tested many regular expressions in RegexBuddy, but no one does what I want. Maybe you have a suggestion?

  • 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-29T20:37:18+00:00Added an answer on May 29, 2026 at 8:37 pm

    If I understand your requirements correctly, then

    ^(.+)\1$
    

    should work. You can restrict the possible matches to only allow digits and commas like this:

    ^([\d,]+)\1$
    

    This matches a “double number” and keeps the first repetition in capturing group number 1. If you want your match only to contain the first repetition, then use

    ^([\d,]+)(?=\1$)
    

    RegexBuddy screenshot

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

Sidebar

Related Questions

I'm really struggling to convert this timestamp to a nice formatted date string. Here's
im struggling with syntax here: hopefully this question is v simple, im just miising
been struggling with an issue now for a day or two. I have an
I'm struggling to find the right terminology here, but if you have jQuery object...
So I've been struggling with a nice and easy way to allow users to
I'm really struggling to get TAL and Chameleon/Pyramid to play nice. . . I
I am struggling with custom toc items added via: \addcontentsline{toc}{section}{Some text here} Actually my
Trying to use Term::ANSIMenu to build a nice menu. The doc says items() expects
I'm still new to MVC 3 and I'm struggling to create a nice error
I've been struggling to find a nice algorithm to change a number (could be

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.