There are two matching algorithms, the standard Perland alternative DFA algorithm: -
The Perl algorithm is what you are used to from Perl and JavaScript. It is fast and supports the complete pattern syntax. You will likely be using it most of the time. -
DFA 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 | TDIPerlRegEx2_16 | 16-bit strings: UnicodeString, WideString | Full UTF-16 Unicode processing if coUtf CompileOption set. | TDIDfaRegEx2_16 | TDIPerlRegEx2_8 | 8-bit strings: AnsiString, RawByteString, Utf8String | Full UTF-8 Unicode processing if coUtf CompileOption set. | TDIDfaRegEx2_8 | 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. |