Retrieve digits from string

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.

你可能感兴趣的:(java)