Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-19-2021, 04:00 AM
dcmontva dcmontva is offline Wildcards in Word Windows 10 Wildcards in Word Office 2019
Novice
Wildcards in Word
 
Join Date: Apr 2019
Location: UK
Posts: 9
dcmontva is on a distinguished road
Default Wildcards in Word


Hi.
Using find & replace & wildcards, I am trying to select text that comes after a colon so that I can format it bold. I am using the following: ( : )(^32)(*^13). This finds the colon and the text after the colon, but I only want the text after the colon to be selected. In the 'replace what' box I just want the text after the colon to be formatted bold. I've tried \1\2\3, but that bolds the colon and the text and if I just use \2\3 the colon disappears altogether. What am I doing wrong?
Any help would be very much appreciated!

Last edited by dcmontva; 06-19-2021 at 06:27 AM.
Reply With Quote
  #2  
Old 06-19-2021, 11:35 AM
Charles Kenyon Charles Kenyon is offline Wildcards in Word Windows 10 Wildcards in Word Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,140
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Try first replacing : with xmx: then use the second option then replace xmx with a colon.
Reply With Quote
  #3  
Old 06-19-2021, 02:24 PM
macropod's Avatar
macropod macropod is offline Wildcards in Word Windows 10 Wildcards in Word Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Formatting applied via Find Replace always applies to the entire found string.

FWIW, your Find/Replace expression could be reduced to (for example):
Find = (: )(*^13)
Replace = \1\2
Regardless, formatting the space after the colon as bold seems rather pointless. I would suggest two Find/Replace operations
Find = : (*^13)
Replace = §\1
replacement = bold
Find = §
Replace = :^32
replacement = not bold
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #4  
Old 06-20-2021, 02:08 AM
dcmontva dcmontva is offline Wildcards in Word Windows 10 Wildcards in Word Office 2019
Novice
Wildcards in Word
 
Join Date: Apr 2019
Location: UK
Posts: 9
dcmontva is on a distinguished road
Default

Hi,

Thank you very much Charles & Paul for your help 👍.

David
Reply With Quote
Reply

Tags
find & replace, wildcards



Similar Threads
Thread Thread Starter Forum Replies Last Post
Wildcards in Word How to return the full string (entire word) when searching with wildcards in word vba scienceguy Word VBA 13 03-23-2019 03:27 AM
Wildcards in Word How to insert Wildcards into Word 2011 Mac such as: \$Filename\ peterspiano Word 4 06-29-2015 05:13 AM
Wildcards in Word word wildcards I need to replace actual text that contains [ and ] larsmula Word 2 02-20-2014 09:18 AM
wildcards in find & replace to reverse word order jeffk Word 3 11-11-2012 01:47 PM
Wildcards in Word Word 2010: Wildcards Replace tinfanide Word 2 09-10-2011 10:40 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:45 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft