Get Example source ABAP code based on a different SAP table
VERSION 5 IN
ABAP_REGEX - POSIX Syntax (obsolete) Regular expressions with POSIX syntax can be specified after the addition REGEX> in obsolete variants of the statements FIND> and REPLACE>> and the obsolete argument regex> > of built-in functions for strings. Objects for POSIX regular expressions can be created with the obsolete factory method CREATE_POSIX> of the system class CL_ABAP_REGEX>> to be used in statements FIND >> and REPLACE>> or with the system class CL_ABAP_MATCHER>>. The POSIX syntax of regular expressions distinguishes the following cases:
Single character patterns>
Character string patterns>
Search patterns>
Replace patterns>
Simplified regular expressions> Using the POSIX syntax for single characters and character strings, regular expressions can be created that match entire character strings or substrings of character strings. The POSIX syntax for find and replace offers some additional elements that support the finding and replacement of substrings in character strings. The special characters that are valid in regular expressions according to POSIX are summarized in:
Special Characters in Regular Expressions> Regular expressions in POSIX syntax are obsolete. Using regular expressions in POSIX syntax leads to a warning from the syntax check that can be hidden by the pragma ##regex_posix>. It is recommended that regular expressions are migrated> from POSIX to PCRE> or another regular expression syntax supported by ABAP.
Latest notes:
The PCRE syntax is more powerful than the POSIX syntax. Furthermore, PCRE regular expressions generally perform better than the POSIX regular expressions supported by ABAP.
Creating objects of class CL_ABAP_REGEX> with the operator NEW>> or the statement CREATE OBJECT>> also creates instances for POSIX regular expressions. NON_V5_HINTS
The test and demonstration program DEMO_REGEX> > allows POSIX syntax to be tested by selecting POSIX>. ABAP_HINT_END
Copyright Note This software uses Version 1.31> of the <(>Boost.Regex Library. Copyright (c) 1998-2003 Dr. John Maddock. <)> Attributes of the standard not yet support in this version are listed here> . The syntax and semantics described here may differ from other regular expression implementations based on the POSIX standard, or even the <(>Boost 1.31 regular expression library<)> in a different configuration.