‎2013 May 23 9:38 AM
Hi all,
i have the following variable string :
DATA: ld_str type char100 value 'un TRES UN Dos Un Tres uN'.
Well, i need to remove all 'un' whatever the case sensitive. At the end i need to have the following string value : 'TRES Dos Tres'.
I supppose i need to use regular expression but i don't know to work with them.
Thanks for your help
‎2013 May 23 9:47 AM
Hi Eric,
Use the following code for removing the specified characters from the given string.
REPLACE ALL OCCURRENCES OF REGEX <your_pattern> IN <your_string> WITH space IGNORING CASE.
EX:
REPLACE ALL OCCURRENCES OF REGEX 'un' IN 'un TRES UN Dos Un Tres uN'
WITH space IGNORING CASE.
Output :
TRES Dos Tres
‎2013 May 23 9:47 AM
Hi Eric,
Use the following code for removing the specified characters from the given string.
REPLACE ALL OCCURRENCES OF REGEX <your_pattern> IN <your_string> WITH space IGNORING CASE.
EX:
REPLACE ALL OCCURRENCES OF REGEX 'un' IN 'un TRES UN Dos Un Tres uN'
WITH space IGNORING CASE.
Output :
TRES Dos Tres
‎2013 May 23 9:56 AM
‎2013 May 23 9:51 AM
Hi,
try this code
DATA: ld_str TYPE char100 VALUE 'un TRES UN Dos Un Tres uN'.
REPLACE ALL OCCURRENCES OF REGEX 'un' IN ld_str WITH space.
condense:ld_str.
WRITE:ld_str.
‎2013 May 23 9:54 AM
Hi Eric,
REPLACE ALL OCCURRENCES OF 'UN' in ld_str WITH ' ' IGNORING CASE.
CONDENSE ld_str.
Regards,
Azhar
‎2013 May 23 9:58 AM
hi ,
Try this code
data: ld_str type char100 value 'un TRES UN Dos Un Tres uN'.
replace all occurrences of 'un' in ld_str with space IGNORING CASE.
write:ld_str.
Regards
Kannan
‎2013 May 23 10:03 AM
can you try this?
DATA: ld_str type char100 value 'un TRES UN Dos Un Tres uN'.
REPLACE ALL OCCURRENCES OF 'un' in ld_str WITH space
IGNORING CASE .