By using the method GET_SUBMATCH of class CL_ABAP_MATCHER, we can get the data in the groups/subgroups.
Goal: get the token to the right of the keyword 'Type'.
DATA: lv_pattern TYPE string VALUE 'type\s+(\w+)',
lv_test TYPE string VALUE 'data lwa type mara'.
CREATE OBJECT ref_regex
EX...