BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
sgtrun
Fluorite | Level 6

<html>

<body>

In Excel I can use the Paste Special to read this this and convert it to Unicode and get rid of the HTML.

Any way to do this in SAS?

 

 

<div align="left" style="min-height: 9pt; "><font face="Arial" color="#000080"><span style="font-size:8pt"><b>Stover,Susan&lt;TEST&gt;, 6/21/2018 12:47:47 PM:&nbsp;</b></span></font><font face="Arial"><span style="font-size:8pt"> <br /></span></font></div>

<div align="left" style="min-height: 9pt; "><font face="Arial"><span style="font-size:8pt">Can this be set to retest with recent or new records?&nbsp; This issue

was encountered while Susan was testing code</span></font></div>

<div align="left" style="min-height: 9pt; "><font face="Arial"><span style="font-size:8pt"><br /></span></font><font face="Arial" color="#000080"><span style="font-size:8pt"><b>________________________________________</b></span></font><font face="Arial"><span style="font-size:8pt"><br /></span></font><p></p>

</div>

</body>

</html>

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User

How about this one:

 

data have;
infile cards truncover;
input x $2000.;
new_x=urldecode(prxchange('s/<[^<>]+>//',-1,x));
cards4;
<html>
<body>
In Excel I can use the Paste Special to read this this and convert it to Unicode and get rid of the HTML.
Any way to do this in SAS?
<div align="left" style="min-height: 9pt; "><font face="Arial" color="#000080"><span style="font-size:8pt"><b>Stover,Susan&lt;TEST&gt;, 6/21/2018 12:47:47 PM:&nbsp;</b></span></font><font face="Arial"><span style="font-size:8pt"> <br /></span></font></div>
<div align="left" style="min-height: 9pt; "><font face="Arial"><span style="font-size:8pt">Can this be set to retest with recent or new records?&nbsp; This issue
was encountered while Susan was testing code</span></font></div>
<div align="left" style="min-height: 9pt; "><font face="Arial"><span style="font-size:8pt"><br /></span></font><font face="Arial" color="#000080"><span style="font-size:8pt"><b>________________________________________</b></span></font><font face="Arial"><span style="font-size:8pt"><br /></span></font><p></p>
</div>
</body>
</html>
;;;;
run;

proc print noobs;run;

View solution in original post

1 REPLY 1
Ksharp
Super User

How about this one:

 

data have;
infile cards truncover;
input x $2000.;
new_x=urldecode(prxchange('s/<[^<>]+>//',-1,x));
cards4;
<html>
<body>
In Excel I can use the Paste Special to read this this and convert it to Unicode and get rid of the HTML.
Any way to do this in SAS?
<div align="left" style="min-height: 9pt; "><font face="Arial" color="#000080"><span style="font-size:8pt"><b>Stover,Susan&lt;TEST&gt;, 6/21/2018 12:47:47 PM:&nbsp;</b></span></font><font face="Arial"><span style="font-size:8pt"> <br /></span></font></div>
<div align="left" style="min-height: 9pt; "><font face="Arial"><span style="font-size:8pt">Can this be set to retest with recent or new records?&nbsp; This issue
was encountered while Susan was testing code</span></font></div>
<div align="left" style="min-height: 9pt; "><font face="Arial"><span style="font-size:8pt"><br /></span></font><font face="Arial" color="#000080"><span style="font-size:8pt"><b>________________________________________</b></span></font><font face="Arial"><span style="font-size:8pt"><br /></span></font><p></p>
</div>
</body>
</html>
;;;;
run;

proc print noobs;run;

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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