* HTML
DATA(lv_html) = |<!DOCTYPE html>| &&
|<html>| &&
|<head>| &&
| <meta charset="utf-8">| &&
| <meta name="viewport" content="width=device-width">| &&
| <title>DOM Read</title>| &&
|</head>| &&
|<body>| &&
| <div id="bodytext"><b>Hallo Welt!</b></div>| &&
| <div id="bodytext">Weiterlesen: <a href="https://codezentrale.de">Link</a></div>| &&
|</body>| &&
|</html>|.
* Alle HTML-Tags finden
DATA(matcher) = cl_abap_matcher=>create( pattern = '<([!A-Za-z][A-Za-z0-9]*)([^>]*)>|</([A-Za-z][A-Za-z0-9]*)>'
text = lv_html
ignore_case = abap_true ).
* Alle gefundenen HTML-Tags mit '' ersetzen
IF matcher->replace_all( '' ) > 0.
WRITE: / matcher->text.
ELSE.
WRITE: / |Keine Tags gefunden.|.
ENDIF.