Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Microsoft Word Regular Expression Question

Status
Not open for further replies.

kc27

Technical User
Sep 10, 2008
171
US
I want to identify and extract all the words in a document that are followed by the register mark (®) symbol.

I built, what I thought was a regular expression that would search for a register mark preceeded by alpha number characters and a space. So if my text contained the sentence "My first car was a Chevrolet Vega®.", the regular expression would find "Vega®"

Below is the regular expression I composed. Wouldn't the \s restrict the search to characters with a register mark that are preceded by a whitespace character?

Instead, it grabs anything with a register mark, not just the register marks preceded by a space and alpha numeric characters.

Where did I go wrong?

\s[\w-®]

 
Perhaps:
<[! ]@®>
Using a wildcard Find in Word, this will find any word containing the ® character, up to and including that character.

Cheers
Paul Edstein
[MS MVP - Word]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top