Extracting specific words from a document

G

gr8fuldave

Hi Folks,

Hello! The solution [a-zA-Z0-9\-_.]{1,}\@[a-zA-Z0-9\-_.]{1,} worke
great for me when extracting several hundred e-mail addresses from
document.

I am faced with another similar challenge. I have a document that has
multitude of the following:
*lastname,firstname throughout the text (with real last and first name
of clients.)

The asterisk is attached to each name.

I need to highlight and copy all the above from the document.

what is the formula to search and highlight *firstname,lastname?

Thanks
 
L

Lisa Wilke-Thissen

Hi,

[unknown Word version]
I need to highlight and copy all the above from the document.
what is the formula to search and highlight *firstname,lastname?

lastname is followed by what - manual line break, paragrah, more text?
 
G

gr8fuldave

Hi Lisa,
This is an exact cut paste from the document:

*Fischer Jr, William O

there are a couple thousand of these I need to extract. I got prett
close and was able to highlight the *lastname, using th
following:\*[a-zA-Z0-9\-_.]{1,}...I can't seem to get it to capture th
Jr, William O etc.


Hi,

[unknown Word version]
-
I need to highlight and copy all the above from the document.
what is the formula to search and highlight *firstname,lastname?-

lastname is followed by what - manual line break, paragrah, more text?
 
L

Lisa Wilke-Thissen

Hi,
This is an exact cut paste from the document:
*Fischer Jr, William O
there are a couple thousand of these I need to extract.
I got pretty close and was able to highlight the *lastname,
using the following:\*[a-zA-Z0-9\-_.]{1,}...
I can't seem to get it to capture the Jr, William O etc.

but you need to know, what is following the firstname. Where has Word to
stop highlighting? Is it a full stop, is it a paragraph mark, is it a manual
line break, is it a colon?
 
G

gr8fuldave

Hi Lisa,
I really can't tell. i looked at the document in every view type, and i
just doesn't show it. I originally received it as .pdf, and converted i
to .docx. If you must know, i am trying to extract e-mail address an
name for an e-mail campaign for my company. All legitimate, but I can'
seem to cull the specific information.

I would be happy to send you a page for research if you think you ca
help. I'm stumped.

but you need to know, what is following the firstname. Where has Word t

stop highlighting? Is it a full stop, is it a paragraph mark, is it
manual
line break, is it a colon?
 
L

Lisa Wilke-Thissen

Hi,
I really can't tell. i looked at the document in
every view type, and it just doesn't show it.

but you do know, how to show all formatting marks in a Word document?
http://office.microsoft.com/en-us/word-help/show-or-hide-formatting-marks-HA010102250.aspx
I would be happy to send you a page for research
if you think you can help.

I think to get the document would help, but it is not necessary. We just
need the information about the systematic:
Where has Word to stop highlighting? Is it a full stop, is it a paragraph
mark, is it a manual line break, is it a colon?
Where does the firstname end?
 
G

gr8fuldave

Lisa said:
Hi,
-
I really can't tell. i looked at the document in
every view type, and it just doesn't show it.-

but you do know, how to show all formatting marks in a Word document?
http://tinyurl.com/28l57yb
-
I would be happy to send you a page for research
if you think you can help.-

I think to get the document would help, but it is not necessary. We jus

need the information about the systematic:
Where has Word to stop highlighting? Is it a full stop, is it
paragraph
mark, is it a manual line break, is it a colon?
Where does the firstname end?

Hi Lisa,
Thanks for the tip-each "first name" is followed by a paragraph mark
 
G

gr8fuldave

gr8fuldave;495124 said:
Hi Lisa,
Thanks for the tip-each "first name" is followed by a paragraph mark.

the exact format is:
*lastname (including Jr, III, etc), First name(paragraph)

How do I search this string and highlight it and cut/copy?

Thanks
 
L

Lisa Wilke-Thissen

Hi,
the exact format is:
*lastname (including Jr, III, etc), First name(paragraph)

using wildcards, you cannot search for a "paragraph mark". So you have to
use the code ^013.

Find | Find what:
\*(*)^013
[= asterix, 0 or more characters, paragraph mark]
Find in: Main document

Now all occurances of "*...........¶" are selected, and you can copy them.
 
G

gr8fuldave

That worked perfectly! WOW you are amazing!

Next question-final for this project (I hope).

I do the search, it highlights all the names as you instructed. I wan
to cut/paste, but for some reason when I go from "Search" back t
document, I control C, it does not cut the highlighted selection.

Can you tell me what I am doing incorrectly?

Thanks so much you are TERRIFIC!

Dave
Hi,
--
Thanks for the tip-each "first name" is followed by a paragrap
mark.--
-
the exact format is:
*lastname (including Jr, III, etc), First name(paragraph)-

using wildcards, you cannot search for a "paragraph mark". So you hav
to
use the code ^013.

Find | Find what:
\*(*)^013
[= asterix, 0 or more characters, paragraph mark]
Find in: Main document

Now all occurances of "*...........¶" are selected, and you can cop
them.
 
P

Peter T. Daniels

Ctrl-C is Copy. Ctrl-X is Cut to clipboard (which I think is what you said
you want). but after Ctrl-C, it's all on the clipboard ready to be pasted
(Ctrl-V) somewhere else.
 
G

gr8fuldave

You would think so! But for some reason, when I try it, it doesn't cu
or copy. I am going from my search back to the document (clicking th
document) I can see all the highlighted things I want to copy (they hav
become yellow), but when I Ctrl-C nothing happens...

ugggh!
 
P

Peter T. Daniels

Highlighting isn't Selecting.

You would think so! But for some reason, when I try it, it doesn't cut
or copy. I am going from my search back to the document (clicking the
document) I can see all the highlighted things I want to copy (they have
become yellow), but when I Ctrl-C nothing happens...

ugggh!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top