Created
July 26, 2013 16:14
-
-
Save rpietro/6090156 to your computer and use it in GitHub Desktop.
extracts email addresses from a string
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
address <- c("whatever, [email protected]", "nothing here","right, [email protected]", "blablabla [email protected]") | |
emailpattern <- '[[:alnum:]\\-_.%+]+@[[:alnum:]\\-_.%+]+\\.[[:alpha:]]+' | |
email_addresses <- str_extract_all(string = address, emailpattern) | |
email_addresses |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment