What does it do? The built-in> predicate function> matches > compares a search range of the argument text>>, defined using off>> and len>>, with the regular expression> specified in regex>>.
If the argument pcre> is used, regex> must contain a PCRE regular expression>.
If the argument xpath> is used, regex> must contain a XPath regular expression>. A regular expression in PCRE or XPath syntax is compiled in an extended mode: Most unescaped whitespace (blanks and line breaks) of the pattern are ignored outside character classes and comments can be placed behind #>. In order to specify whitespace and #> in a pattern, they must be escaped or the extended mode must be switched of with (?-x)>> in the regular expression. The function returns a truth value>.
The return value is true when the whole search range matches the regular expression.
It is false else. The comparison is case-sensitive by default, but this can be overridden using the parameter case>>.
Latest notes:
The match function match>> can be used to return a substring that matches a regular expression.
Besides pcre> and xpath>, the obsolete argument regex>> can also be used. Then an obsolete POSIX regular expression> must be passed. NON_V5_HINTS ABAP_HINT_END
ABAP_EXAMPLE_VX5 The first predicate function returns the value true> because the argument val> only contains letters. The second predicate function returns the value false> because the argument val> also contains numbers. ABEXA 01123 ABAP_EXAMPLE_END