2009 Jan 23 4:31 PM
I have the following RegEx. I need to split ip numbers alone from the string
data: v_str type string ,
t_result type match_result_tab ,
wa_result like line of t_result,
lt_result type match_result_tab.
v_str = 'abc.com:122.11.31.12xyz.com:111.16.1.1sdn.com:123.122.0.4 '.
data matcher type ref to cl_abap_matcher.
matcher = cl_abap_matcher=>create(
pattern = `d+.d+.d+.d+`
ignore_case = 'X'
text = v_str ).
lt_result = matcher->find_all( ).
Any Info?
a®
2009 Jan 23 4:48 PM
Your regex works in this case. The location of the matches is captured in the table, and you just need to loop through and print them:
loop at lt_result into wa_result.
write:/ v_str+wa_result-offset(wa_result-length).
endloop.
I have the following RegEx. I need to split ip numbers alone from the string
data: v_str type string ,
t_result type match_result_tab ,
wa_result like line of t_result,
lt_result type match_result_tab.
v_str = 'abc.com:122.11.31.12xyz.com:111.16.1.1sdn.com:123.122.0.4 '.
data matcher type ref to cl_abap_matcher.
matcher = cl_abap_matcher=>create(
pattern = `d+.d+.d+.d+`
ignore_case = 'X'
text = v_str ).
lt_result = matcher->find_all( ).
Any Info?
a®
2009 Jan 23 4:48 PM
Your regex works in this case. The location of the matches is captured in the table, and you just need to loop through and print them:
loop at lt_result into wa_result.
write:/ v_str+wa_result-offset(wa_result-length).
endloop.
2009 Jan 26 3:09 PM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |