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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T16:49:28+00:00 2026-05-10T16:49:28+00:00

I need to do a lot of searches of certain patterns in source files

  • 0

I need to do a lot of searches of certain patterns in source files while the user is changing them, so I need to do regexp matching that is efficient in time and memory. The pattern repeats itself so should be compiled once, but I need to be able to retrieve subparts (rather than just confirm a match)

I’m considering using java.util.regexp or the Jakarta perl5util (if it still exists, been a few years since I used it), or perhaps the Eclipse search engine though I doubt that ti’s smarter.

Is there any significant performance difference between the two?

  • 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. 2026-05-10T16:49:29+00:00Added an answer on May 10, 2026 at 4:49 pm

    I am not sure there is a huge performance gap in term of the different regexp java engines.

    But there sure is a performance issue when constructing a regexp (and that is, if the data is large enough, as noted by Jeff Atwood)

    The only thing you should avoid is catastrophic backtracking, better avoided when using atomic grouping.

    So, by default I would use the java.utils.regexp engine, unless you have specific perl-compliant sources of regexp you need to reuse in your program.

    Then I would carefully construct the regexp I intend to use.

    But in term of choosing one engine or another… as it has been said in many other questions…:

    • ‘make it work, make it fast – in that order’
    • beware of ‘premature optimization’.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 62k
  • Answers 62k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer RoutedCommands and MVVM do not mix. RoutedCommands are tied to… May 11, 2026 at 10:11 am
  • added an answer >>> from mechanize import Browser >>> b = Browser() >>>… May 11, 2026 at 10:11 am
  • added an answer Yeah, You're almost there. A delegate refers to a method… May 11, 2026 at 10:11 am

Related Questions

I need to do a lot of searches of certain patterns in source files
I need to do a dump of a table on a remote server, but
I need to do a simple mail merge in OpenOffice using C++, VBScript, VB.Net
I need to do a join across two different database servers (IPs 10.0.0.50 and
I need to do a comparaison between an object and NULL. When the object
I need to do a few very simple URL manipulations in Java. Like get
I need to do a query that search for a text with 'Nome %
I need to do a union of two tables using NHibernate and HQL. I
I need to do a modulus operation on very large integers. The biggest integer
I need to do a date comparison in Mysql without taking into account the

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.