eraseTags
Erase HTML and XML tags from text
Syntax
Description
erases HTML and XML comments and tags from the elements of newStr = eraseTags(str)str.
The function erases comments and tags with tag name a,
abbr, acronym, b,
bdi, bdo, big,
code, del, dfn,
em, font, i,
ins, kbd, mark,
rp, rt, ruby,
s, small, span,
strike, strong
sub, sup, tt,
u, var and wbr, and
replaces all other tags with a space.
Tip
The eraseTags function erases the HTML and XML
tags only. It does not erase HTML and XML
elements. That is, the function removes tags of the
form <X>, where X denotes the tag
name and any attributes. The function does not remove content that appears
between opening and closing tags. For example,
eraseTags("x<a>y</a>") returns the string
"xy". It only removes the tags
<a> and </a>, and does not
remove the element <a>y</a>.
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2017b