[ABAP] RegEx – String auf Float/Integer testen

* http://www.regular-expressions.info/floatingpoint.html
DATA: lv_in TYPE string VALUE '-1.23'. " oder 1.23E-10 oder -1
DATA: lv_out TYPE f.

DATA(matcher) = cl_abap_matcher=>create( pattern = '^[-+]?[0-9]*[.]?[0-9]+([eE][-+]?[0-9]+)?$'
                                         text = lv_in
                                         ignore_case = abap_true ).

IF matcher->match( ) = abap_true.
  lv_out = lv_in.
  WRITE: / lv_out.
ENDIF.