Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-31-2016, 11:20 AM
Bansaw's Avatar
Bansaw Bansaw is offline newb - search and replace - WILDCARDS - keep original...? Windows XP newb - search and replace - WILDCARDS - keep original...? Office 2007
Novice
newb - search and replace - WILDCARDS - keep original...?
 
Join Date: Jul 2011
Posts: 4
Bansaw is on a distinguished road
Default newb - search and replace - WILDCARDS - keep original...?

I need to replace a few things in a document.



Like this:

# 45 A needs to become # 45 B
# 78 A needs to become # 78 B
# 102 A needs to become # 102 B

So basically the REPLACE needs to remember what its found in step 1 and put that same string back. So I am asking it, "remember 45" and "remember 78" and put them back in the replace string.
Reply With Quote
  #2  
Old 09-01-2016, 03:25 AM
macropod's Avatar
macropod macropod is offline newb - search and replace - WILDCARDS - keep original...? Windows 7 64bit newb - search and replace - WILDCARDS - keep original...? Office 2010 32bit
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

For that, you'd need to use a wildcard Find/Replace, with expressions like:
Find = (# 45 )A
Replace = \1B
Find (# 78 )A
Replace = \1B
Find (# 102 )A
Replace = \1B
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 09-01-2016, 05:39 AM
Bansaw's Avatar
Bansaw Bansaw is offline newb - search and replace - WILDCARDS - keep original...? Windows XP newb - search and replace - WILDCARDS - keep original...? Office 2007
Novice
newb - search and replace - WILDCARDS - keep original...?
 
Join Date: Jul 2011
Posts: 4
Bansaw is on a distinguished road
Default

Thanks, but can I not do:

Find: # [any-digit][any-digit] A
Replace: [the-digit][the-digit] B

?
Reply With Quote
  #4  
Old 09-01-2016, 06:20 AM
macropod's Avatar
macropod macropod is offline newb - search and replace - WILDCARDS - keep original...? Windows 7 64bit newb - search and replace - WILDCARDS - keep original...? Office 2010 32bit
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

If what your latest post is indicative of your actual Find/Replace expressions, you clearly haven't implemented the Find/Replace as described. Moreover, it seems you actually want to process something other than what you described in your first post. From your latest post it seems you might need to use a wildcard Find/Replace with:
Find = (# [0-9]{2,} )A
Replace = \1B
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 09-01-2016, 11:16 AM
Bansaw's Avatar
Bansaw Bansaw is offline newb - search and replace - WILDCARDS - keep original...? Windows XP newb - search and replace - WILDCARDS - keep original...? Office 2007
Novice
newb - search and replace - WILDCARDS - keep original...?
 
Join Date: Jul 2011
Posts: 4
Bansaw is on a distinguished road
Default

ok, thanks, I got it to work now.

Once I figured out that \1 means "everything you find in the first ( ) brackets" then it made sense.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
newb - search and replace - WILDCARDS - keep original...? best way to use search/replace wildcards in this scenario? dylansmith PowerPoint 3 03-04-2023 08:55 PM
Using wildcards how do I Find and Add to, not replace Stargehzer Word 3 01-25-2016 09:14 PM
newb - search and replace - WILDCARDS - keep original...? Search and Replace special characters between word using wildcards mauuuuu5 Word 1 08-23-2015 09:20 PM
newb - search and replace - WILDCARDS - keep original...? Search with wildcards imag Word 1 11-05-2014 11:42 PM
Any wildcards search and replace in Powerpoint 2010? tinfanide PowerPoint 0 09-10-2011 02:17 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:34 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