Time to switch to a more standard regexp engine ?

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

_meta_
Junior Member
Junior Member
Posts: 34
Joined: 2006-11-14, 08:04 UTC

2ghisler(Author)

Post by *_meta_ »

I'll quote from help:
TPerlRegEx is a Delphi VCL wrapper around the open source PCRE library, which implements Perl-Compatible Regular Expressions. PCRE source code, with minor modifications, is included. PCRE was compiled into a DLL with C++Builder 6. By default, the OBJ files are linked directly into your application when using TPerlRegEx, and the DLL is not needed. Remove the definition of NO_PCRE_DLL in the PerlRegEx.pas unit if you prefer to use the DLL.
It's not native VCL, but the regex syntax it supports is very complete.
User avatar
majkinetor !
Power Member
Power Member
Posts: 1580
Joined: 2006-01-18, 07:56 UTC
Contact:

Post by *majkinetor ! »

I'm not aware of any better RegEx library in Delphi. I don't want to use another external dll for now.
AutoHotkey didn't add it as external library but included it is in main exe. I said LoadLibrary just as an example of usage but you can also staticly link it.
Habemus majkam!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50532
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry, I don't have a Borland C compiler to create a lib which I could link with Delphi. Libs created with MS VC++ 6.0 cannot be linked with Delphi code. :(
Author of Total Commander
https://www.ghisler.com
_meta_
Junior Member
Junior Member
Posts: 34
Joined: 2006-11-14, 08:04 UTC

2ghisler(Author)

Post by *_meta_ »

PoV
Junior Member
Junior Member
Posts: 9
Joined: 2003-10-16, 12:35 UTC
Location: Paris, France

Re: 2ghisler(Author)

Post by *PoV »

_meta_ wrote:Obj files are already included here...

http://www.regular-expressions.info/download/TPerlRegEx.zip
Is it me, or does it look like a very good news in disguise ? ;)
User avatar
majkinetor !
Power Member
Power Member
Posts: 1580
Joined: 2006-01-18, 07:56 UTC
Contact:

Post by *majkinetor ! »

Sorry, I don't have a Borland C compiler to create a lib which I could link with Delphi. Libs created with MS VC++ 6.0 cannot be linked with Delphi code
Hm... can't help here.... never did that... maybe it is possible but I wouldn't know.


But TPerlRegEx sounds like nice solution for this problem. It would be good to use AHK library if possible as it is already extensively tested and I confirm it is very fast and small.
Habemus majkam!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50532
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I will try it, thanks!
Author of Total Commander
https://www.ghisler.com
Raymond
Senior Member
Senior Member
Posts: 454
Joined: 2003-02-08, 15:43 UTC

Post by *Raymond »

Just found out that I can't search multibyte like Chinese when searching file or searching in Lister by RegEx.
Is it a bug or just the limit of TC's regex engine?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50532
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

It's probably a limitation of the Regex engine TRegEx, sorry.
Author of Total Commander
https://www.ghisler.com
franc
Senior Member
Senior Member
Posts: 263
Joined: 2005-10-27, 14:09 UTC

Post by *franc »

I vote too for a better RegEx-Library!

franc
User avatar
dott
Senior Member
Senior Member
Posts: 285
Joined: 2007-03-04, 00:58 UTC
Location: La Plata, Argentina

Post by *dott »

PashkaTLT
New Member
New Member
Posts: 1
Joined: 2012-02-10, 14:08 UTC

Post by *PashkaTLT »

Are we cursed to use the TRegExpr library for the whole life?

It is very limited and contains bugs.

One of the examples:

text:
"INTO
customers"

search string:
"INTO\s+customers"

this regexp should find the text, but in TC it does not.

If the author doesn't want to change this library then maybe it is possible to make a support for regexp plugins so it will be possible to dynamically choose the used regexp engine?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50532
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This isn't the fault of TRegExpr - it's a limitation of TC that you can only search within lines.
Author of Total Commander
https://www.ghisler.com
Post Reply