Previous Page | Next Page

Functions and CALL Routines

HTMLDECODE Function



Decodes a string that contains HTML numeric character references or HTML character entity references, and returns the decoded string.
Category: Web Tools
Restriction: I18N Level 2

Syntax
Arguments
Details
Examples
See Also

Syntax

HTMLDECODE(expression)


Arguments

expression

specifies a character constant, variable, or expression.


Details

The HTMLDECODE function recognizes the following character entity references:

Character entity reference decoded character
& &
&lt; <
&gt; >
&quot; "
&apos; '

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.   [cautionend]


Examples

SAS Statements Results
x1=htmldecode('not a &lt;tag&gt;');
not a <tag>
x2=htmldecode('&amp;');
'&'
x3=htmldecode ('&#65;&#66;&#67;');
'ABC'


See Also

Function:

HTMLENCODE Function

Previous Page | Next Page | Top of Page