ABAP Replacing


Example

The REPLACE statement can work with regular expressions directly:

DATA(lv_test) = 'The quick brown fox'.
REPLACE ALL OCCURRENCES OF REGEX '\wo' IN lv_test WITH 'XX'.

The variable lv_test will evaluate to The quick bXXwn XXx.