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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T09:44:02+00:00 2026-06-10T09:44:02+00:00

Does anyone have any idea why this regular expression is causing my application to

  • 0

Does anyone have any idea why this regular expression is causing my application to hang?

/^(?:((?:.+?)(?: of the )?)+) of the (?:(.+?)) (?:"(.+?)")$/

It hangs when I try to use it to match strings like this:

'description of the post "This is a Post"'

But it seems to happen pretty fast when I use it to match a shorter string like this:
'age of the person "Bob"'

Any ideas on why this is happening or how I can fix it?

  • 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-10T09:44:04+00:00Added an answer on June 10, 2026 at 9:44 am

    This is the result of catastrophic backtracking in your regular expression, the following portion of your regex is likely the culprit:

    ((?:.+?)(?: of the )?)+
    

    You should try to refactor your regular expression any time you have nested repetition. In this case I think you can simplify that entire portion to .+ and have your regex behave the same way.

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

Sidebar

Related Questions

Does anyone have any idea what this jQuery selector will do? object.find('td:eq(1) div div');
(Using the GUI builder) Does anyone have any idea what this thing wants from
Does Anyone have any idea why this code produces this errors in OS 3.0
Does anyone have any idea why this code seems not to work? What am
Does anyone have any idea what this warning/error means in firefox: Unexpected value align
Does anyone have any idea how this can be implemented? Some examples: https://play.google.com/store/apps/details?id=gpc.myweb.hinet.net.PopupVideo https://play.google.com/store/apps/details?id=com.milone.floatwidget
does anyone have any idea why this function is not working in Jquery? $('.left').show(slide,
Does anyone have any idea if this is possible? Most of the sample for
Does anyone have any idea why this is failing? ree-1.8.7-2011.03 :008 > 3.times.inject({}) {|result,
Does any one have any idea why this would be happening? This is some

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.