ARTICLE
match - Match Function
The match function returns a subfield of a character-like argument that
matches a regular expression.
Syntax
... match( val = text
regex = regex [
case = case ] [
occ = occ ] ) ...
Effect
The match function scans text
for the matches (specified in
occ ) with the regular
expression (specified in regex
) and returns the substring found. The search is case-sensitive by
default, but this can be overridden using the parameter
case .
The return code has the type string .
Example
Refer to string functions, count
, find , and match .
Runtime Exceptions Catchable Exceptions
CX_SY_REGEX_TOO_COMPLEX
Reason for error: More information: Exceptions
in Regular Expressions .
Runtime error: REGEX_TOO_COMPLEX
CX_SY_STRG_PAR_VAL
Reason for error: Regular expression in regex is empty or there are
0 occurrences in occ .
Runtime error: STRG_ILLEGAL_PAR
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved