Skip to content

Commit

Permalink
add script to pull emails from registrant csv
Browse files Browse the repository at this point in the history
  • Loading branch information
ha0ye committed Sep 26, 2019
1 parent 1e5ecef commit 9b02201
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions gainesville/extract_emails.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
library(tidyverse)

xx <- read_csv("Participant_List_Formatted (3).csv")
pattern <- "\\n([a-zA-Z0-9.]+@[a-zA-Z0-9.]+(com|edu|org))"

yy <- purrr::map(xx, function(v) {
str_match(v, pattern)[, 2] %>%
na.omit()
})

emails <- do.call(c, yy)
names(emails) <- NULL

paste0(emails, collapse = ", ") %>%
write(file = "addresses.txt")

0 comments on commit 9b02201

Please sign in to comment.