The REPLACE statement can work with regular expressions directly:
REPLACE
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.
lv_test
The quick bXXwn XXx