View Single Post
 
Old 11-10-2019, 04:22 PM
Genericname1111 Genericname1111 is offline Windows 7 64bit Office 97-2003
Novice
 
Join Date: Aug 2019
Posts: 17
Genericname1111 is on a distinguished road
Default

Quote:
Originally Posted by Charles Kenyon View Post
I am confident that what you want can be done in a single replace.


However, I would start with a replace of:
Find text: "Page "
Replace text: "Page_"

Then a second replace:
Find Text: "Page_^#"
Replace Text: "^&"

(all without the quotation marks)
Thank you. Trying this, the problem I encounter here is that because I'm using a non-breaking space (the underscore was just an example for my post), I only want the non-breaking spaces between e.g. the word "page" and a number that comes afterwards, but not when there's a word after "page". So that method works to replace all instances where it's "page 1", "page 2", etc., but then it also adds non-breaking spaces after all instances of page, and I can't then remove them easily for those instances where there's a word after page, because ^$ isn't a valid character for the replace box.

So basically I want (as examples):
Before: page 1 -> page_1
Before: page 20 -> page_20
But not:
page of -> page_of
page that -> page_that

But i'm not sure how to achieve that easily.
Reply With Quote