View source: R/text_cleaning_functions.R
txt_clean_nonascii | R Documentation |
'txt_clean_nonascii' removes non-standard characters from text, but keeps space, -, and . by default, using regex matching. Default matching can be overridden by 'regex' option.
txt_clean_nonascii(string, regex = "[^[:alnum:][:blank:]+?&/\\-\\.]")
string |
character string, or vector of character strings which will be cleaned |
regex |
defaults to remove all non-ascii text characters, but keeping a few |
A character string or vector, now stripped of any non-matching values
test_strings <- c("\"The Erlenmeyer Flask\"‡", "\"My Struggle\"‡", "\"Founder's Mutation\"", "\"Mulder & Scully Meet the Were-Monster\"",
"\"Home Again\"", "\"Babylon\"", "\"My Struggle II\"‡" )
test_strings
txt_clean_nonascii(test_strings)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.