View Single Post
 
Old 10-23-2019, 09:19 AM
qubie qubie is offline Windows 7 64bit Office 2007
Novice
 
Join Date: Aug 2016
Posts: 24
qubie is on a distinguished road
Default I am trying to delete text of any format between two bold, recurring keywords or symbols

Greetings,

I have tried to come up with a Word macro or other gadget that will remove all text between two defined "keywords/symbols".

The beginning and ending keywords/symbols are always in bold font, and they are consistent throughout the records with which I work.

The intervening words between the beginning and ending keywords/symbols might be a mix of formatting other than bold-font characters -- i.e., not-bold, italic, and/or underlined.

Here is a generic example that is representative:

. . . Research Refs.: [O]striches are a family, Struthionidae, of flightless birds. The two extant species of ostrich are the common ostrich and Somali ostrich, both in the genus Struthio, which also contains several species known from Holocene fossils such as the Asian ostrich. Please refer to § 18.05 for more information. The common ostrich is the more widespread of the two living species, and is the largest living bird species. Other ostriches are also among the largest bird species ever . . . . §

It is common for a not-bold "§" symbol to appear in the intervening content between the keywords/symbols of interest.

My goal is to strip out all this content from lengthy records. In other words, I desire to remove all content that begins with "Research Refs.:" and ends with "§" -- the keyword/symbol and everything in between.

I have been unable, however, to derive a pattern to work. Specifically, I am unclear how to cause Word to "catch" or stop at the ending instance of "§", and how to cause Word to ignore intervening "§" symbols that are not-bold.

This seems horribly simple, so I apologize in advance that I must look to finer minds for guidance on the point.

With much thanks.

Q.
Reply With Quote