Displaying 1 result from an estimated 1 matches for "texcheckr".
2017 Jun 19
0
\U or \L perl regex in gsub removes text outside capturing group in UTF-8 contexts
...to have changed
from R 3.4.0, but the documentation for the replacement argument has not.
## Reprex (A call to readLines is essential. A url is provided for
convenience but the behaviour should reproduce for local files)
bib <- readLines("
https://raw.githubusercontent.com/HughParsonage/TeXCheckR/master/tests/testthat/lint_bib_in.bib",
encoding = "UTF-8", n = 10)
bib8910 <- bib[8:10]
gsub("(\\w+)", "\\U\\1", bib8910, perl = TRUE)
#> [1] "@TECHREPORT" " AUTHOR" " TITLE"
Expected result (in R 3.4.0):
#> [1] "...