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 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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