Share via

Find and Replace Wildcards Not Working

Anonymous
2019-06-16T03:07:05+00:00

Hello,

My office recently updated to Office 365, and I am currently running MS Word 2016 MSO (Version 1803 - 16.0.9126.2387 32-bit). Since the update, the word wildcard find and replace feature does not appear to be functioning properly.

So, for example, if I turn on wildcards and use the following "Find what" and "Replace With":

Find What: (ABS)-([0-9]+)-([0-9]+)

Replace With:  \1^~\2^~\3

It should replace the hyphens with non-breaking hyphens. Instead, if for example, the found the phrase was "ABS-9-24", the replacement would be "ABS924--". Similarly, replacing formatting of a string, (e.g., using "^&" as the Replace with and specifying a red font) does not have any effect.

I regularly performed replacements like this in Word 2013. Is this something that changed in the latest version or is there a setting that could have changed this?

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Doug Robbins - MVP - Office Apps and Services 323.1K Reputation points MVP Volunteer Moderator
2019-06-16T07:24:53+00:00

The find what string should be (ABS)-([0-9]{1,})-([0-9]{1,}) and that has always been the case.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Anonymous
    2019-06-17T11:31:03+00:00

    Dear Joe,

    Based on your requirement, it seems that you want to replace "ABS-9-24" with "ABS924--" (for example). 

    Thank you Cliff for taking the time to respond. My goal is actually in that example to replace the regular hyphens with non-breaking hyphens and otherwise keep it as the same format. However, the replacement actually jumbles it up together to instead replace it with "ABS924--".  I was trying to figure out why the search and replace is placing the find what expressions in the front and disregarding the actual replacement string.

    Also, I realize now after Doug's response below I posted the wrong syntax for the search function when I asked the question. I was using it like his.

    That said, I figured out the solution after trying again on a different document. It turns out that turning off Tracked Changes solved the issue! 

    Thank you for helping!

    Joe

    Was this answer helpful?

    3 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2019-06-16T05:54:10+00:00

    Dear Joe,

    Based on your requirement, it seems that you want to replace "ABS-9-24" with "ABS924--" (for example). If yes, you may find (ABS)-([0-9])-([0-9][0-9]) and replace it with \1\2\3^~^~. You can try it to see if you can get the result.

     

    Meanwhile, about “replacing formatting of a string, (e.g., using ‘^&’ as the Replace with and specifying a red font) does not have any effect.”, what character do you type when using wildcards? Could you also upload some screenshots showing what you get in your Word 2016 application?

    Best Regards,

    Cliff

    Was this answer helpful?

    0 comments No comments