Looking for a 3rd party Regex component/routine for use in Delphi app...

Hello, could some experts please recommend a good fast 3rd party regex component (free or paid) that I can use and call within my Delphi app? It doesn't really have to be a pure Delphi component, it can be an external DLL. The key thing is speed - I need a regex engine that will execute fast. My app won't be processing very complicated regex expressions, but will make use of Capture Groups a lot. I won't be using any "Alternation", but do need backtracking capabilities of course. Thanks for any advice.

Regards
   Shawn

P.S: I'm using Delphi 7. Also, I am no expert in the field of regex... I just know a bit.
shawn857Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

aikimarkCommented:
Have you tried the TRegex VCL component?
http://docwiki.embarcadero.com/CodeExamples/XE7/en/TRegExReplace_(Delphi)

You can use the vbscript.regexp ActiveX component that is already on Windows systems.
shawn857Author Commented:
Aikimark: TRegexReplace can be used in Delphi 7?

Thanks
   Shawn
aikimarkCommented:
No.  I was reading too fast and thought I saw "Delphi 7" as a supported version.

You might want to look at Jan Goyvaerts's TPerlRegex library.  TPerlRegex wraps the (open source) PCRE:
http://www.regexguru.com/2008/08/tperlregex-for-delphi-2009/

TDIRegEx library:
http://www.yunqa.de/delphi/doku.php/products/regex/index

Project Jedi JclPCRE library:
http://wiki.delphi-jedi.org/wiki/JCL_Help:JclPCRE_Using

Not sure if it's free, but Regexp Studio seems to be a D7 option:
http://regexpstudio.com/

============
I wish Microsoft had COM-wrapped their regular expression name space.  That would have made this recommendation so much easier.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Fundamentals of JavaScript

Learn the fundamentals of the popular programming language JavaScript so that you can explore the realm of web development.

shawn857Author Commented:
Thank you Aikimark... which of those do you think would be the fastest, do you think?

Thanks
   Shawn
aikimarkCommented:
I don't know.  I haven't done a head-to-head performance test.

Throw some sample data at these different methods and compare their performances.  Estimate the performance with production data volumes, based on the sample data performance.
aikimarkCommented:
Two of these wrap the PCRE and I would expect their performance to be close to one another.  However, implementation differences might result in very different performance profiles - think about memory management differences.
käµfm³d 👽Commented:
I wish Microsoft had COM-wrapped their regular expression name space.  That would have made this recommendation so much easier.
Well, you could download Visual Studio Community Edition (or Express, but CE is slightly better and just as free, so why not?) and build a DLL that does expose .NET's regex library to COM. I've done an example of this:

http://www.experts-exchange.com/Software/Office_Productivity/Office_Suites/MS_Office/Excel/Q_26450356.html#a33598281
shawn857Author Commented:
Thanks Kaufmed, that's interesting. Over my head... but interesting. I wonder if anyone out there has already done this for Delphi?

Thanks
   Shawn
shawn857Author Commented:
This has never been implemented for Delphi yet...? :


"Well, you could download Visual Studio Community Edition (or Express, but CE is slightly better and just as free, so why not?) and build a DLL that does expose .NET's regex library to COM. I've done an example of this:
http://www.experts-exchange.com/Software/Office_Productivity/Office_Suites/MS_Office/Excel/Q_26450356.html#a33598281"

Thanks
    Shawn
käµfm³d 👽Commented:
I haven't coded in Delphi before, so I could not speak to that. I have to defer to someone who's more versed in Delphi. I'm primarily a C# (.NET) developer, hence my suggestion of installing Visual Studio. The steps to create the library aren't terribly involved, but if you haven't done .NET stuff before, then it could seem daunting. I'd be happy to walk you through creating it, but for a straight Delphi solution I have to defer.
shawn857Author Commented:
OK thank you anyway Kaufmed, but I just don't have spare time to embark on another project like that.

Thanks
     Shawn
shawn857Author Commented:
Thank you guys!

Cheers
    Shawn
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Regular Expressions

From novice to tech pro — start learning today.