Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Delete special character from string

Former Member
0 Likes
1,124

Hello,

how cann i delete a speacial character from a dataset.

f.e. delete 'a' from 'AaAaBbBb' returns 'AABbBb'.

Best regards,

TomSd

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,096

use REPLACE ALL OCCURENCES OF 'a' WITH ''.

This will do,,

Reward if it helps

6 REPLIES 6
Read only

Wil_Wilstroth
Active Participant
0 Likes
1,096

Hi Thomas,

tp_output = 'AaAaBbBb'.

REPLACE 'a' WITH space INTO tp_output.

Your output will look like 'A A BbBb'.

Then you finally condense it to remove spaces.

CONDENSE tp_output.

And it will look like your desired result 'AABbBb'

Hope it helps you

Thanks

William Wilstroth

Edited by: william wilstroth on Dec 18, 2007 5:20 PM

William Wilstroth
Read only

Former Member
0 Likes
1,096

Hi,

Check the code below:

v_string = 'AaAaBbBb' .

if v_string ca 'a'

replace 'a' with ' ' into v_string.

condense v_string with no-gaps.

endif.

regards

Kannaiah

Read only

Former Member
0 Likes
1,096

hi,.

data:out(10).

out = 'AaAaBbBb'.

REPLACE ALL OCCURRENCES OF 'a' IN out WITH ' '.

write out.

Pls Reward with points......

Rgrds,

Kumaresh

Read only

Former Member
0 Likes
1,096

hi,.

data:out(10).

out = 'AaAaBbBb'.

REPLACE ALL OCCURRENCES OF 'a' IN out WITH ' '.

write out.

Pls Reward with points......

Rgrds,

Kumaresh

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,096

wk_var = ''AaAaBbBb'

replace all occurrences of 'a' in wk_var with space.

condense wk_var.

Read only

Former Member
0 Likes
1,097

use REPLACE ALL OCCURENCES OF 'a' WITH ''.

This will do,,

Reward if it helps