2009 Apr 07 3:50 PM
Hi All,
I have a expression " ^(.)(\d)(あ|い|う|え|お|か|き|く|け|こ|わ|れ)(\d*)$ " in Visual Basic.
Please help me how to perform this in ABAP. It would be helpful, if any function module is available for the above expression.
2009 Apr 07 4:03 PM
Try this way
move '^(.*)(d*)(u3042|u3044|u3046|u3048|u304A|u304B|u304D|u304F|u3051|u3053|u308F|u308C)(d*)$' to p_regex.
condense p_regex.
create object regex
exporting
pattern = p_regex
ignore_case = ''.
* For REGEX match
matcher = cl_abap_matcher=>create(
pattern = p_regex
ignore_case = ' '
table = i_files ).
lt_result = matcher->replace_all( ).
But i am not sure how this will work in Unicode environment, ie these above said chinese characters
a®
Hi All,
I have a expression " ^(.)(\d)(あ|い|う|え|お|か|き|く|け|こ|わ|れ)(\d*)$ " in Visual Basic.
Please help me how to perform this in ABAP. It would be helpful, if any function module is available for the above expression.
2009 Apr 07 4:03 PM
Try this way
move '^(.*)(d*)(u3042|u3044|u3046|u3048|u304A|u304B|u304D|u304F|u3051|u3053|u308F|u308C)(d*)$' to p_regex.
condense p_regex.
create object regex
exporting
pattern = p_regex
ignore_case = ''.
* For REGEX match
matcher = cl_abap_matcher=>create(
pattern = p_regex
ignore_case = ' '
table = i_files ).
lt_result = matcher->replace_all( ).
But i am not sure how this will work in Unicode environment, ie these above said chinese characters
a®