Remove Undesired Characters From Strings
These functions are utilities to clear undesired characters from REDCap output.
stripHTMLTags( x, tags = c("p", "br", "div", "span", "b", "font", "sup", "sub"), ignore.case = TRUE ) stripUnicode(x)
x
: character
, vector of content to be cleaned.tags
: character
, vector of HTML tags to remove from x
ignore.case
: logical(1)
, should cases be ignored when matching patterns? Defaults to TRUE
.stripHTMLTags
returns a character
vector.
stripUnicode
returns a character
vector.
stripHTMLTags("<p>Text in a paragraph <b>tag</b> with bold formatting </p>") stripUnicode("\U00B5 = 0")