#1
|
|||
|
|||
Wildcards used for Search and Replace
Hello I am trying to perform a search for any character immediately followed by a hyphen (ie no space) and replace it with the same character followed by a space and a hyphen: Search for "?-" and replace with "? -" where the ? is a wildcard. However everytime I perfrom the search the wild card character is replaced with "?". eg search for "2015-" is being replaced with "201? -" It should read "2015 -". Is there a way to do this using the find and replace facility? |
#2
|
|||
|
|||
Solved it, I used
Find = (?)- Replace = \1 - |
#3
|
||||
|
||||
Your Find/Replace would, amongst other things, replace a single space with a pair of spaces. You'd probably do better to use something like:
Find = ([0-9A-Za-z])- Replace = \1^s- As coded, my version ensures there's actually a letter or number before the hyphen, then inserts a non-breaking space before it - which ensures the hyphen doesn't end up starting a new line.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
best way to use search/replace wildcards in this scenario? | dylansmith | PowerPoint | 3 | 03-04-2023 08:55 PM |
newb - search and replace - WILDCARDS - keep original...? | Bansaw | Word | 4 | 09-01-2016 11:16 AM |
Search and Replace special characters between word using wildcards | mauuuuu5 | Word | 1 | 08-23-2015 09:20 PM |
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 |