fork(2) download
  1. txt <- "Message-ID: <24216240.1075855687451.JavaMail.evans@thyme>
  2. Date: Wed, 18 Oct 2000 03:00:00 -0700 (PDT)
  3. From: phillip.allen@enron.com
  4. To: leah.arsdall@enron.com
  5. Subject: Re: test
  6. Mime-Version: 1.0
  7. Content-Type: text/plain; charset=us-ascii
  8. Content-Transfer-Encoding: 7bit
  9. X-From: Phillip K Allen
  10. X-To: Leah Van Arsdall
  11. X-cc:
  12. X-bcc:
  13. X-Folder: \\Phillip_Allen_Dec2000\\Notes Folders\\'sent mail
  14. X-Origin: Allen-P
  15. X-FileName: pallen.nsf
  16.  
  17. test successful. way to go!!!"
  18.  
  19. result <- regmatches(txt, regexec("X-FileName:[^\n]+\n\n(.+)$", txt))
  20. result[[1]][2]
Success #stdin #stdout 0.16s 178496KB
stdin
Standard input is empty
stdout
[1] "test successful.  way to go!!!"