Regular Expression Library for Borland Builder 6.0

Does anyone use Boost for regular expressions in BCB6 or can recommend something else? I downloaded the last ZIP file with acceleration several times, but I can’t unzip it yet (my computer is probably not in the best condition right now). This is a pretty huge library, so if there is something even smaller that is just regular expressions, this works well with BCB6, I would like to try this first. I tried http://www.regular-expressions.info/delphi.html , but it has no BCB support information (just Delphi), and it looks like some of the presented OBJ files have problems with BCB (and there is no source code to restore them).

Edit: after searching for the source code and including folders in CBuilder6 \ I found that Builder has built-in regex support. So another question: do they work well, and what set of functions / objects should be used for a VCL-based application? I found TRegexp (but not the docs for it), as well as some PCRE functions in the CRTL help file (but I would prefer to use a higher level or C ++ if everything is about the same).

+4
source share
1 answer

The TPerlRegex classes (available at the link above) work fine in C ++ Builder. See the section on the middle of the page for older versions of Delphi. Best of all, they are free with the complete Delphi source, which will also compile in Builder.

The components / classes are based on PCRE and actually include the C source for .obj files that are used when compiling that do not require DLLs, but you can also use it without .obj files by compiling to require DLLs and distributing DLLs with your application.

The associated application with this RegexBuddy website can generate strong C-based code for regular expressions or it can generate Delphi code (or C ++ Builder XE, which can be easily made to work with Builder 6 if you remember that Builder XE is based on Unicode, and Builder 6 - no). (I am not affiliated with RegexBuddy, I have just been a user since version 1 was released.)

Here is an example of RegexBuddy 3 C (PCRE) support:

RegexBuddy 3 screen cap

+4
source

Source: https://habr.com/ru/post/1404007/


All Articles