eliminating text from a document

O

optionski

I have a word doc that I want to search through and eliminate text if a
certain string (the double underscore) is found.

The document may look like this:
Some of , __ happiness , 14456 time , __ health , __ intelligence , 2x
cigarettes , __ growth , 44 height

The double underscore is the key to the text I want to eliminate. I want to
eliminate any text between the commas that contains a double underscore.

So the above document is modified to look like this:
Some of , 14456 time , 2x cigarettes , 44 height

Easy?? I hope.

Thanks so much, Rick
 
J

Jezebel

Bit hard to comment, since the 'double underscore' doesn't show up in your
post: is it meant to be a character or a bit of formatting?
 
D

Doug Robbins - Word MVP

You can do that using Edit>Replace. With the "Use wildcards" box checked,
enter

, __ [A-z]{1,}

in the "Find what:" control and leave the "Replace with;" control empty.

For and explanation of the find string, see the article "Finding and
replacing characters using wildcards" at:

http://www.word.mvps.org/FAQs/General/UsingWildcards.htm


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
O

optionski

Jezebel said:
Bit hard to comment, since the 'double underscore' doesn't show up in your
post: is it meant to be a character or a bit of formatting?

The double underscore is "two underscores" . It is NOT formatting.
It (the two underscores) is the text (characters) that I am using to help me
identify what pieces of text need to be eliminated from the document.
Rick
 

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