You can try the following regexp: .*([^ ]+@.*)$
This assumes that the email address is the last string and all strings are space separated. -- Fruit Vendor On Sun, Jul 13, 2014 at 3:43 PM, ESChamp <esch...@gmail.com> wrote: > I apologize for having to ask this but my nearly-80-year-old brain just > could not come up with a solution. > > I have a text file consisting of several space-separated fields: > > lastname firstname other other other ... emailaddress > > I wish to write a new file that contains only the emailaddress field > contents. > > There's no need to test the emailaddress field. > > I just need a quick and dirty solution as this will be used just one time. > > Thanks in advance. > > -- > To unsubscribe, e-mail: beginners-unsubscr...@perl.org > For additional commands, e-mail: beginners-h...@perl.org > http://learn.perl.org/ > > >