Link to home
Start Free TrialLog in
Avatar of jskfan
jskfanFlag for Cyprus

asked on

Script to extract words from a text

I have word document with text on it that looks similar to the excerpt  below:

 Mal, Glo <Gmaldonado@Mydomain.com>; Lar, Mar V <Mlarco@Mydomain.com>; Wil, Ly A <LWILSON@Mydomain.com>; Wil, Ste <Swilsher@Mydomain.com>; Nea, Mar<Mnealy@Mydomain.com>; Har, Kim S <Kharris@Mydomain.com>

I need a script that goes through the document and retrieve only, the first part of the email.
for instance, for this : Mal, Glo <Gmaldonado@Mydomain.com>
the script will retrieve only Gmaldonado and export it to a text file

the text file will look like:
Mlarco
Gmaldonado
LWILSON
Avatar of Bill Prew
Bill Prew

Please provide a sample of the Word document.

~bp
Avatar of jskfan

ASKER

it does not matter if it is word document or .txt file. the content is the same , it is like this:

Mal, Glo <Gmaldonado@Mydomain.com>; Lar, Mar V <Mlarco@Mydomain.com>; Wil, Ly A <LWILSON@Mydomain.com>; Wil, Ste <Swilsher@Mydomain.com>; Nea, Mar<Mnealy@Mydomain.com>; Har, Kim S <Kharris@Mydomain.com>
Well, it does make a difference to the script, so which are we reading, a Word DOC file, or a generic TXT file?

Does the list of email addresses every break to a new line with a line feed in the of this list of email addresses?

~bp
Avatar of jskfan

ASKER

what needs to be retrieved is located between the sign < and the sign @

for the line break it is not consistent
ASKER CERTIFIED SOLUTION
Avatar of Bill Prew
Bill Prew

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jskfan

ASKER

Excellent Bill !!
it Worked !!
Great,

~bp