title: Extract e-mail address from string using r
body: <p>These are 5 twitter user descriptions. The idea is to extract the e-mail from each string.</p>
  
  <p>This is the code i've tried, it works but there is probably something better. 
  I'd rather avoid using unlist() and do it in one go using regex. I've seen other questions of the kind for python/perl/php but not for R.
  I know i could use grep(..., perl = TRUE) but that should't be the only way to do it. 
  If it works, of course it helps.</p>
  
  <pre><code>ds &lt;- c("#MillonMusical | #PromotorMusical | #Diseñador | Contacto :        ezequielife@gmail.com | #Instagram : Ezeqielgram | 01-11-11 |           @_MillonMusical @flowfestar", "LipGLosSTudio by: SAndry RUbio           Maquilladora PRofesional estudiande de diseño profesional de maquillaje     artistico lipglosstudio@hotmail.com/", "Medico General Barranquillero   radicado con su familia en Buenos Aires para iniciar Especialidad       Medico Quirurgica. email jaenpavi@hotmail.com", "msn =
      rdt031169@hotmail.comskype = ronaldotorres-br", "Aguante piscis /       manuarias17@gmail.com  buenos aires"
      )
  
  ds &lt;- unlist(strsplit(ds, ' '))
  ds &lt;- ds[grep("mail.", ds)]
  
  &gt; print(ds)
  [1] "\t\tezequielife@gmail.com"  "lipglosstudio@hotmail.com/"
  [3] "jaenpavi@hotmail.com"       "rdt031169@hotmail.comskype"
  [5] "/\t\tmanuarias17@gmail.com"
  </code></pre>
  
  <p>It would be nice to separate this one "rdt031169@hotmail.comskype"
  perhaps asking it to end in .com or .com.ar that would make sense for what i'm working on</p>