fork download
  1. str1 <- "L'école 'ici' nationale ' d'administration"
  2. s1 <- gsub("(*UTF)(*UCP)\\s*'\\B|\\B'\\s*", "", str1, perl=TRUE)
  3. s1
  4. s2 <- gsub("(*UTF)(*UCP)\\b'\\b(*SKIP)(*F)|'", "", str1, perl=TRUE)
  5. s2
  6. gsub("(([^A-Za-z])'|'([^A-Za-z]))", "\\2 ", s2)
Success #stdin #stdout 0.47s 79168KB
stdin
Standard input is empty
stdout
[1] "L'école ici nationale d'administration"
[1] "L'école ici nationale  d'administration"
[1] "L cole ici nationale  d'administration"