Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-20-2014, 07:48 AM
Cosmo Cosmo is offline Wildcard Find/Replace deletes extra character Windows Vista Wildcard Find/Replace deletes extra character Office 2007
Competent Performer
Wildcard Find/Replace deletes extra character
 
Join Date: Mar 2012
Posts: 240
Cosmo is on a distinguished road
Default Wildcard Find/Replace deletes extra character

I'm trying to do a Find/Replace with a wildcard to find text which doesn't have a certain character (in this case a circle-R) following it. This will eventually be done through a VBA script, but I am having issues doing it manually as well.



The search string I am using is "XXXXXXX[!®]", and the replacement string is "XXXXXXX®". The problem I am having is that it is replacing the next character after the search string (usually either a space or a period), so that if it found "XXXXXXX is a..." I get "XXXXXXX®is a..." and "XXXXXXX. The..." becomes XXXXXXX® The..."
Reply With Quote
  #2  
Old 06-20-2014, 08:49 AM
Cosmo Cosmo is offline Wildcard Find/Replace deletes extra character Windows Vista Wildcard Find/Replace deletes extra character Office 2007
Competent Performer
Wildcard Find/Replace deletes extra character
 
Join Date: Mar 2012
Posts: 240
Cosmo is on a distinguished road
Default

I figured this out. I replaced my search pattern with:
"(XXXXXXX)([!®])"

and my replacement pattern with:
"\1®\2"


My mistake was I was reading the search as 'XXXXXX not followed by a ®", where it was really "'XXXXXX followed by any character except ®", and that character was part of the found string.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Wildcard Find/Replace deletes extra character Need help using WildCard Find & Replace Cayce Word 1 06-09-2014 04:17 PM
Change characters outside a wildcard while keeping wildcard results nymusicman Word VBA 2 04-10-2014 08:17 AM
Wildcard Find/Replace deletes extra character Help with the "find and replace" option; character problem martinn4 Word 3 02-20-2014 03:52 AM
Wildcard Find/Replace deletes extra character How to replace this word file using wildcard zhangzujin361 Word 1 01-18-2014 08:02 PM
Wildcard Find/Replace deletes extra character Bad view when using Find and Find & Replace - Word places found string on top line paulkaye Word 4 12-06-2011 11:05 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:59 PM.


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