Jump to content
You must now use your email address to sign in [click for more info] ×

find/replace on textchain or selected text


Recommended Posts

How can I find/replace execute only in a selection or a text chain?

I’m woking on a book with 280 pages (which works really fine, btw.). But when it comes to change some things by find/replace i.e. only in one chapter – how can I do that? Showing hundrets of results over the complete text isn’t really handy …

Is there a way? I would be glad to hear about it!

 

Thanks for reading.

................................................................................
macOS 10.13.6 | MacBookPro | 2.5 GHz Intel Core i5 | Affinity Suite

Link to comment
Share on other sites

3 minutes ago, elk said:

Is there a way? I would be glad to hear about it!

II don't know of a way to search in a selection.

This is an all or nothing action at the moment, I'm afraid.

A workaround is to copy your selection to a temporary document, perform find and replace and paste it back.

We all hope for great improvements in this area in the future.

 

2017 27” iMac 4.2 GHz Quad-Core Intel Core i7 • Radeon Pr 580 8GB • 64GB • Ventura 13.6.4.

iPad Pro (10.5-inch) • 256GB • Version 16.4

Link to comment
Share on other sites

It can be done in Publisher, but it's a bit complex and involves using regular expressions.

  1. Pick a text string that does not exist in your document, perhaps something like AAAZZZ
  2. Insert that string at the beginning of the area you want to search, and also at the end. Thus, your document will have AAAZZZthe text you want to search inAAAZZZ
  3. In the Find and Replace panel, click the gear icon for the Find field, and make sure that the Regular Expression option is enabled.
  4. As a Find term, use (AAAZZZ.*?)your-find-term(.*AAAZZZ)
  5. For Replace with, use /1your-replace-term/2

When you're done, delete both occurrences of AAAZZZ

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

Link to comment
Share on other sites

1 hour ago, Seneca said:

II don't know of a way to search in a selection.

This is an all or nothing action at the moment, I'm afraid.

A workaround is to copy your selection to a temporary document, perform find and replace and paste it back.

We all hope for great improvements in this area in the future.

 

Simple workaround and somehow better than make it in plain text editor (what I did after writing the post).

Thanks for reading.

................................................................................
macOS 10.13.6 | MacBookPro | 2.5 GHz Intel Core i5 | Affinity Suite

Link to comment
Share on other sites

23 minutes ago, walt.farrell said:

It can be done in Publisher, but it's a bit complex and involves using regular expressions.

  1. Pick a text string that does not exist in your document, perhaps something like AAAZZZ
  2. Insert that string at the beginning of the area you want to search, and also at the end. Thus, your document will have AAAZZZthe text you want to search inAAAZZZ
  3. In the Find and Replace panel, click the gear icon for the Find field, and make sure that the Regular Expression option is enabled.
  4. As a Find term, use (AAAZZZ.*?)your-find-term(.*AAAZZZ)
  5. For Replace with, use /1your-replace-term/2

When you're done, delete both occurrences of AAAZZZ

This one is a handy workround without leaving the current document. I will try this one.

Thanks for reading.

................................................................................
macOS 10.13.6 | MacBookPro | 2.5 GHz Intel Core i5 | Affinity Suite

Link to comment
Share on other sites

  • 1 month later...
On 6/18/2020 at 1:14 PM, walt.farrell said:

It can be done in Publisher, but it's a bit complex and involves using regular expressions.

  1. Pick a text string that does not exist in your document, perhaps something like AAAZZZ
  2. Insert that string at the beginning of the area you want to search, and also at the end. Thus, your document will have AAAZZZthe text you want to search inAAAZZZ
  3. In the Find and Replace panel, click the gear icon for the Find field, and make sure that the Regular Expression option is enabled.
  4. As a Find term, use (AAAZZZ.*?)your-find-term(.*AAAZZZ)
  5. For Replace with, use /1your-replace-term/2

When you're done, delete both occurrences of AAAZZZ

Thanks for the tip.

It will be useful but is far from a perfect solution. I find strange that there is no options to article, selection only search. For the kind of work I do is a tool I use continually. I hope is on the list for future updates.

Link to comment
Share on other sites

  • 2 years later...
  • 4 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.