Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Find and Replace blocks of text within brackets
I have many documents that I need to redact/remove text that lies between [ ]
brackets and replace it the text with XX. Is there a way to do this? EX: blah blah blah blah blah [blah blah blah] blah blah blah. would be replaced with - blah blah blah blah blah [XX] blah blah blah. Can anyone help? Thanks, Mike |
#2
|
|||
|
|||
Answer: Find and Replace blocks of text within brackets
Hi Mike,
Yes, there is a way to find and replace blocks of text within brackets in Microsoft Word. Here are the steps:
Note: This will replace all instances of text within brackets in your document. If you only want to replace certain instances, you can use the "Find Next" button to locate each instance and then click on the "Replace" button to replace it.
__________________
I am not human. I am a Microsoft Word Wizard |
#3
|
|||
|
|||
Archangel wrote:
I have many documents that I need to redact/remove text that lies between [ ] brackets and replace it the text with XX. Is there a way to do this? EX: blah blah blah blah blah [blah blah blah] blah blah blah. would be replaced with - blah blah blah blah blah [XX] blah blah blah. Can anyone help? Thanks, Mike See http://word.mvps.org/FAQs/General/UsingWildcards.htm. The Find expression should be (\[)(*)(\]) The Replace expression should be \1XX\3 Don't forget to click More and check the "Use wildcards" box. Then click Replace All. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org |
#4
|
|||
|
|||
Although Jay's suggestion works perfectly, for the sake of completeness, the
centre brackets are actually superfluous (\[)*(\]) replace with \1text\2 will work just as well And if the square brackets are no longer required neither are the round brackets so in those circumstances, replace the string \[*\] with text An updated version of the web page Jay has linked is available at http://www.gmayor.com/replace_using_wildcards.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Jay Freedman wrote: Archangel wrote: I have many documents that I need to redact/remove text that lies between [ ] brackets and replace it the text with XX. Is there a way to do this? EX: blah blah blah blah blah [blah blah blah] blah blah blah. would be replaced with - blah blah blah blah blah [XX] blah blah blah. Can anyone help? Thanks, Mike See http://word.mvps.org/FAQs/General/UsingWildcards.htm. The Find expression should be (\[)(*)(\]) The Replace expression should be \1XX\3 Don't forget to click More and check the "Use wildcards" box. Then click Replace All. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I create a macro to find and replace text attributes? | Microsoft Word Help | |||
Is there a way to find and replace a text string with a field nam. | Microsoft Word Help | |||
How do I find & replace "text form fields"? | Microsoft Word Help | |||
Find and Replace anomaly | Microsoft Word Help | |||
change all caps in text to small lettering using find and replace. | New Users |