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;

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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
  • 1121 views
  • 0 likes
  • 2 in conversation