Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-03-2024, 05:41 AM
WJSwanepoel WJSwanepoel is offline Wilcard string to search for p.111. Windows 10 Wilcard string to search for p.111. Office 2021
Advanced Beginner
Wilcard string to search for p.111.
 
Join Date: Dec 2019
Location: Krugersdorp, South Africa
Posts: 82
WJSwanepoel is on a distinguished road
Question Wilcard string to search for p.111.

I need to use wildcards in Word to search for a string starting with "p." followed by up to 3 digits followed by a period. Eg. p.5., p.54., p.139.



I then need to make it superscript and change the colour.
Reply With Quote
  #2  
Old 04-03-2024, 10:09 AM
Charles Kenyon Charles Kenyon is offline Wilcard string to search for p.111. Windows 11 Wilcard string to search for p.111. Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,474
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

And, what have you tried?
Replace using wildcards by Graham Mayor, MVP



Learn to use Styles for formatting. A style can be one of the things used in the Replace function.
The Importance of Styles in Microsoft Word
Reply With Quote
  #3  
Old 04-03-2024, 06:43 PM
Robert2 Robert2 is offline Wilcard string to search for p.111. Windows 10 Wilcard string to search for p.111. Office 2019
Competent Performer
 
Join Date: Jun 2013
Posts: 174
Robert2 will become famous soon enoughRobert2 will become famous soon enough
Default

Try the following wildcard Find/Replace:
Find = p.[0-9]{1,}.
Replace = ^&
Don't forget to associate the Replace with box with Superscript and color Font format.
Attached Images
File Type: png 2024-04-04_033726.png (9.4 KB, 9 views)
Reply With Quote
  #4  
Old 04-03-2024, 10:51 PM
WJSwanepoel WJSwanepoel is offline Wilcard string to search for p.111. Windows 10 Wilcard string to search for p.111. Office 2021
Advanced Beginner
Wilcard string to search for p.111.
 
Join Date: Dec 2019
Location: Krugersdorp, South Africa
Posts: 82
WJSwanepoel is on a distinguished road
Default

Thank you, I manage to get the job done,
Reply With Quote
Reply

Tags
regex, wildcards

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wilcard string to search for p.111. Word 2007 - Wilcard Expression - End of File qubie Word 2 10-04-2017 06:31 AM
Search for specific data in a text string teligence Excel 1 05-20-2017 11:51 AM
Wilcard string to search for p.111. search for string, wherever found, at end of line, insert 8 <cr>s sbktex Word VBA 2 09-17-2014 04:09 PM
Wilcard string to search for p.111. Search first section for specific string... donaldadams1951 Word VBA 4 03-14-2014 11:24 AM
Wilcard string to search for p.111. Way to search for a string in text file, pull out everything until another string? omahadivision Excel Programming 12 11-23-2013 12:10 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:50 AM.


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