Using wildcards for whole phrases

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to delete all text between a set of phrases that start with </a> and
end with </li>. The text in between the brackets is all different. So I want
an expression like Replace </a>xxxyyydddaaa</li> where the words represented
by xxx, yyy, ddd, and aaa are different words of varying lengths. Or an
expression that says, "delete everything between these two symbols or
letters."
 
In Find and Replace, click More if necessary, and enable Use wildcards.

Find what:\</a\>*\</li\>

Replace with:(leave empty)

This assumes that you want to delete the </a> and </li> dilimiters as well.
If you want to leave those, then set Replace with to:

</a></li>

Note: because < and > are special characters in the Find what: field when
Use wildcards is enabled, you have to precede them with the \ character to
force Word not to interpret them as the beginning/end of a word.
 

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

Back
Top