‎2010 Aug 12 9:39 AM
Dear Friends,
I have a requirement where I have to remove all the ( from a string.
My string is like this 'amitsharmav((((sdf(()]]hfg]]]'. Is it possible than please specify the ABAP command or the function module name.
Thanks & Regards
Amit Sharma
‎2010 Aug 12 10:00 AM
Use,
REPLACE ALL OCCURENCES OF '(' in string1 with space.
condence string1.
‎2010 Aug 12 9:46 AM
Use REPLACE
[ FIRST OCCURRENCE OF | ALL OCCURRENCES OF ]
[ SUBSTRING ] old
IN [ SECTION OFFSET off LENGTH len OF ] text
WITH new.
taken form abaphelp .
‎2010 Aug 12 9:50 AM
Hello
data: str1(50),
str2(50).
str1 = 'amitsharmav((((sdf(()]]hfg]]]'.
str2 = '( ) [ ] '.
TRANSLATE str1 USING str2.
condense str1.
write str1.
‎2010 Aug 12 10:00 AM
Use,
REPLACE ALL OCCURENCES OF '(' in string1 with space.
condence string1.
‎2010 Aug 12 11:07 AM
Hie Amit
Have a look at the report DEMO_REGEX_TOY.
regards
Isaac Prince