DATA Step, Macro, Functions and more

find and replace observation

Accepted Solution Solved
Reply
Contributor dpa
Contributor
Posts: 35
Accepted Solution

find and replace observation

I have variable values like

data test;

input spool $;

15'

7'

'8

/8

13\

16j

1

2

3:

;

run;

 

so I want to select observation with special character before digit and after digit one and replace them with only digit so remove special character.

so out put will be like

15

7

8

8

13

16

1

2

3

 

Thanks


Accepted Solutions
Solution
‎08-26-2016 11:53 AM
Respected Advisor
Posts: 3,777

Re: find and replace observation

spool2 = compress(spool,,'DK');

View solution in original post


All Replies
Solution
‎08-26-2016 11:53 AM
Respected Advisor
Posts: 3,777

Re: find and replace observation

spool2 = compress(spool,,'DK');
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 196 views
  • 0 likes
  • 2 in conversation