Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-26-2018, 06:11 AM
ganesang ganesang is offline Word find and replace Windows XP Word find and replace Office 2016
Competent Performer
Word find and replace
 
Join Date: Jul 2018
Posts: 171
ganesang is on a distinguished road
Default Word find and replace

Hi Folks



I need the wild card or whatever which needs to be find and replace as follows,

To find: AAA-BB-DASDARF or 080152YCK281 or ILL1-218-01-MM-C-D (please note that the finding value should come with any combination of letters, numbers and hyphens)

Replace with: ppvalue="whatever we found from the above value"

Please help me out on this?

Thanks
Ganesan. G
Reply With Quote
  #2  
Old 11-26-2018, 07:51 AM
gmayor's Avatar
gmayor gmayor is offline Word find and replace Windows 10 Word find and replace Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,106
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Any combination of letters and numbers without some reference as to where they start and stop is a bit of a stretch, but a search for

<[A-Z0-9-]{12,18}>
might work for you.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #3  
Old 11-26-2018, 09:50 PM
ganesang ganesang is offline Word find and replace Windows XP Word find and replace Office 2016
Competent Performer
Word find and replace
 
Join Date: Jul 2018
Posts: 171
ganesang is on a distinguished road
Default

Thanks for the help!! gmayor

Still some of the occurrences not found like as follows, (sorry if i missing on this)

14AS48MA-TN
15NUA98CA
SZFZ10L-TR
FZQ3975-5.0LTT

Also note that the above numbers are not any particular length (even if it is 8 digits numbers can be possible)

Please advise on this.
Reply With Quote
  #4  
Old 11-27-2018, 12:02 AM
gmayor's Avatar
gmayor gmayor is offline Word find and replace Windows 10 Word find and replace Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,106
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

The wider you open the window, the more dirt comes in.

However in this case try

<[A-Z0-9.-]{8,18}>
You may however get some false positives. See http://www.gmayor.com/replace_using_wildcards.htm
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #5  
Old 11-27-2018, 12:04 AM
ganesang ganesang is offline Word find and replace Windows XP Word find and replace Office 2016
Competent Performer
Word find and replace
 
Join Date: Jul 2018
Posts: 171
ganesang is on a distinguished road
Default

Yes. I can tried this way too.

Anyway thanks for the help gmayor.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
In Find and Replace, can Word stop after each Replace? wardw Word 1 06-08-2017 02:47 PM
Word find and replace Find & Replace Unique word raghugada Word VBA 23 05-24-2017 02:09 AM
Word find and replace MS Word 2016 Find and Replace BillM Word 2 03-14-2017 10:49 AM
Word find and replace Need help using Find & Replace (MS Word) BZee Word 9 02-16-2015 05:45 PM
Word find and replace 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 10:10 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