`

Retrieve digits from string

    博客分类:
  • ABAP
阅读更多
REPORT  ztest.


DATA: w_str TYPE string  VALUE 'EDABC4',
      result_tab TYPE match_result_tab.
FIELD-SYMBOLS <match> LIKE LINE OF result_tab.

START-OF-SELECTION.
  FIND ALL OCCURRENCES OF REGEX '0|1|2|3|4|5|6|7|8|9' IN w_str RESULTS result_tab.
  LOOP AT result_tab ASSIGNING <match>.
    WRITE: / w_str+<match>-offset(<match>-length).
  ENDLOOP.
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics