delete large chunk of repeated text

B

BBA

How do I delete a large chunk of repeated paragraphs in Word? I tried the
Find and replace feature but was unsuccessful.
 
K

Klaus Linke

How do I delete a large chunk of repeated paragraphs in Word? I tried the
Find and replace feature but was unsuccessful.

You mean the same paragraph repeated several times?

In "Edit > Replace", check the option to "Match wildcards".
Find what: ([!^13]@^13){2,}
Replace with: \1

(In some localized versions of Word, you have to use {2;} instead of {2,})


^13 is the code of a paragraph mark.
[!^13] matches any other character (except paragraph marks).
[!^13]@ matches any number of the above.

So [!^13]@^13 matches any paragraph.
The (braces) are used to group stuff so you can re-use it.
{2,} means "two or more of the preceeding expression".

So the whole expression in "Find what" matches a paragraph that's repeated
two or more times.

\1 (in "Replace with") inserts the first group ... in this case, the
repeated paragraph.

Regards,
Klaus
 

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