DATA Step, Macro, Functions and more

string cleaning

Reply
New Contributor
Posts: 2

string cleaning

Hello,

I have a variable called link_detail that is json file and I want to get rid of {}[]'":. I see that prxchange type funtions can be applied to do this. Any help is appreciated.I am attaching one record that hopefully will help understandig the question.

SAS Employee
Posts: 118

Re: string cleaning

Use the compress function:

data _null_;
link_detail = '{a} [a]';
link_detail = compress(link_detail, '{}[]');
put link_detail;
run;

Ask a Question
Discussion stats
  • 1 reply
  • 104 views
  • 0 likes
  • 2 in conversation