info about regex

This commit is contained in:
rtremeaud 2018-10-20 11:18:59 +02:00 committed by GitHub
parent 2a0f02d1c3
commit 442692dcc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,7 +34,8 @@ if (!file.exists(f)) {
l <- c( l <- c(
# [foo](bar) # [foo](bar)
str_extract_all(u, "\\(http(.*?)\\)") %>% str_extract_all(u, "\\(http(.*?)\\)") %>% # using regular expression see https://gist.github.com/vitorbritto/9ff58ef998100b8f19a0
# for more infos
lapply(str_replace_all, "^\\(|\\)$", "") %>% lapply(str_replace_all, "^\\(|\\)$", "") %>%
unlist, unlist,
# [foo]: bar # [foo]: bar