html_to_bbcode.RdConverts an HTML string to BBCode. BBCode is commonly used in the Steam forum and other bulletin boards.
html_to_bbcode(x, preserve_newlines = FALSE)A character string containing BBCode formatted text.
string1 <- "<b>test</b>"
string2 <- "<br>\n"
string3 <- "<a href='google.com'>link</a>"
html_to_bbcode(string1)
#> [1] "[b]test[/b]"
html_to_bbcode(string2)
#> [1] "\n"
html_to_bbcode(string3)
#> [1] "[url=google.com]link[/url]"