Functions and CALL Routines |
Decodes a string that contains HTML numeric character references
or HTML character entity references, and returns the decoded string.
-
expression
-
specifies a character constant, variable,
or expression.
The HTMLDECODE function recognizes the
following character entity references:
Character entity reference |
decoded character |
& |
& |
< |
< |
> |
> |
" |
" |
' |
' |
Unrecognized entities (&<name>;) are left unmodified in the
output string.
The HTMLDECODE function recognizes numeric entity references
that are of the form
&#nnn;
|
where nnn
specifies a decimal number that contains one or more digits. |
&#Xnnn;
|
where nnn
specifies a hexadecimal number that contains one or more digits. |
Operating Environment Information: Numeric character references
that cannot be represented in the current SAS session encoding will not be
decoded. The reference will be copied unchanged to the output string.
SAS Statements |
Results |
x1=htmldecode('not a <tag>');
|
not a <tag>
|
x2=htmldecode('&');
|
'&'
|
x3=htmldecode ('ABC');
|
'ABC'
|
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.