title: Extract string from the text using R
body: <p>The input below is the text file. The below is the data input</p>
  
  <pre><code>From: abc@xyz.com
  
  To: qwe@xyz.com, ewq@xyz.com
  
  tuu@xyz.com, vbn@xyz.com
  
  lkj@xyz.com, jkl@xyz.com
  
  Subject: Introduction to R
  
  B-CC: qwe@xyz.com, ewq@xyz.com
  
  tuu@xyz.com, vbn@xyz.com
  
  lkj@xyz.com, jkl@xyz.com
  </code></pre>
  
  <p>Required Output:</p>
  
  <p>I need all the mail id into one object from To And B-CC. Challenge is all the email ids are not in one line its in different line. Need to copy all the email ids into one object</p>
  
  <pre><code>To: qwe@xyz.com, ewq@xyz.com, tuu@xyz.com, vbn@xyz.com, lkj@xyz.com, jkl@xyz.com
  
  B-CC: qwe@xyz.com, ewq@xyz.com, tuu@xyz.com, vbn@xyz.com, lkj@xyz.com, jkl@xyz.com
  </code></pre>