Amazing technological breakthrough possible @S-Logix pro@slogix.in

Office Address

  • #5, First Floor, 4th Street Dr. Subbarayan Nagar Kodambakkam, Chennai-600 024 Landmark : Samiyar Madam
  • pro@slogix.in
  • +91- 81240 01111

Social List

How to find email id and split the domain name from a given list using regular expression in R?

Description

To find email id and split the domain name from a given list using regular expression in R

Process

  Load the data list

  Find the email id using grep()

  Split the local part and domain name using regmatches()

Sapmle Code

mailid=c(“abcd789dfg@gmail.com”,”Not @ mail”,”Simply word”,”asdf456@gmail.com”,”@a13.05″)
#To find the mail ID’s
mm=grep(“@[[:alnum:]]+\\.com”,mailid,value=T)
mm
#To split the local part and domian name of the mail ID
regmatches(mm,gregexpr(“@”,mm),invert = T)

Screenshots
find email id and split the domain name from a given list using regular expression in R