views:

802

answers:

4

Hello,

I am searching a pure Delphi library with good full-Perl syntax support.

It should:

  • match groups (both named and numbered)
  • be able to match, replace, split
  • support look-ahead and look behind
  • come with source
  • be free
  • support Unicode
  • be compatible with Delphi 2009

Which library you prefer?

A: 

Here is a short list and discussion on the Delphi About.com site. I've heard good things about TPerRegEx, but haven't used it. The only drawback with it (for me) is the external dll.

Bruce McGee
Bruce -- you can link in the OBJ files and end up with no external DLL. It's very nice.
Nick Hodges
That is nice. I try to avoid deploying extra DLLs if I can help it.
Bruce McGee
+2  A: 

DIRegEx has worked very well for me, and it doesn't require any external DLLs. However, the source code isn't free, so it may not meet your needs.

Nick Bradbury
+14  A: 

Jan Goyvaerts is the guy for Delphi regular expressions.

http://www.regular-expressions.info/delphi.html

He has a nice set of classes based on the PCRE libraries that can be compiled into your Delphi applications.

He's the author of RegexBuddy, a popular application built with Delphi.

http://www.regexbuddy.com/delphi.html

Nick Hodges
Nick, is this the one that will be added to D2010?
Gad D Lord
There won't be a Regular Expressions Library in D2010, sadly. Probably next time around.
Nick Hodges
TPerlRegEx meets all of Gad's requirements, except that it's not pure Delphi. It's a wrapper around PCRE, which is written in C.
Jan Goyvaerts