🔒 This topic is solved and locked.
Need further help from the community? Please
sign in and ask a new question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 07-25-2021 05:44 AM
(2265 views)
I have SAS Data set with one of the column defined in HTML format. I have to convert this HTML Column into Text format. I have used Perl based HTML parsers, but it is not working.
We have French Alphabet characters in above comments (first line; â, ê, î, ô, û); and it should be available as actual French text characters (â, ê, î, ô, û) post conversion.
Is there any way to do it in SAS?
If not in SAS programming, is there any way to show it as a report as we are displaying above data into a Stored Process report?
Thanks in advance for your help.
1 ACCEPTED SOLUTION
5 REPLIES 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
So you want to remove html tags and just keep the text?
Or do you want to reuse the html as is in a SAS generated report?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I want to keep only the text from it. I'm going to show actual text in report. So, no need to reuse html.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
How about removing tags with this simple (but not fail proof) syntax?
data T;
HTML='<a>sfdsfdsf</a>sdsd';
TEXT=prxchange('s/<[^>]*?>//',-1,HTML);
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Post some sample data and the output you want see, that would be better to explain your question.