There are two matching algorithms, the standard Perland alternative DFA algorithm:
algorithm is what you are used to from Perl
is a special purpose algorithm. If finds all possible matches and, in particular, it finds the longest. It never backtracks and supports partial matching better, in particular multi-segment matching of very long subject strings.
YuPcre2 has native interfaces for 8-bit, 16-bit, and 32-bit strings. Component wrappers are available for UnicodeString / WideString and AnsiString / Utf8String / RawBytestring:
| Component || String Types || Comment |
| 16-bit strings: |
| Full UTF-16 Unicode processing if coUtf CompileOption set. |
| 8-bit strings: |
AnsiString, RawByteString, Utf8String
| Full UTF-8 Unicode processing if coUtf CompileOption set. |
The YuPcre2 RegEx2 classes descend from common ancestors which implement the core functionalities:
Match strings and and extract full or substring matches.
Search for regular expressions within streams and memory buffers.
TDIRegExSearchStream descendants employ a buffered search within streams and files (of virtually unlimited size) and use little memory.
Replace full matches or partial substrings.
List full matches or partial substrings.
Format full matches or partial substrings by adding static or dynamic text.
Users familiar with the DIRegEx might be interessted in thedifferences between YuPcre2 and DIRegEx.