fork download
  1. options(encoding = "UTF-8")
  2.  
  3. test1 <- 'aland islands'
  4. test2 <- 'åland islands'
  5.  
  6. regex1 <- "[å|a]land islands"
  7. regex2 <- "(*UCP)\\b([å|a])land islands"
  8.  
  9. grepl(regex1, test1, perl = TRUE)
  10. grepl(regex2, test1, perl = TRUE)
  11.  
  12. grepl(regex1, test2, perl = TRUE)
  13. grepl(regex2, test2, perl = TRUE)
  14.  
  15. grepl(regex1, test2, perl = FALSE)
  16. grepl(regex2, test2, perl = FALSE)
Success #stdin #stdout 0.23s 39720KB
stdin
Standard input is empty
stdout
[1] TRUE
[1] TRUE
[1] TRUE
[1] TRUE
[1] TRUE
[1] FALSE