ABAP Keyword Documentation → ABAP - Reference → Processing Internal Data → Character String and Byte String Processing → Statements for Character String and Byte String Processing → REPLACE → REPLACE pattern IN
REPLACE - pattern
Other versions: 7.31 | 7.40 | 7.54
Syntax
... {[SUBSTRING] substring} | {REGEX regex} ... .
Effect
Definition of a search pattern for the statements REPLACE
and REPLACE IN TABLE
. The search can either search for a substring substring
or for a
regular
expression regex
. substring
and a directly specified regex
are
character-like expression
positions. The syntax and semantics are the same as in the definition of a search pattern for the statement FIND
.
Note
A regular expression can be have correct syntax, but be too complex for the execution of the statement
REPLACE
, which raises a handleable exception of the class CX_SY_REGEX_TOO_COMPLEX. Refer to
Exceptions in Regular Expressions.