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

Search area limitation when searching and replacing?


Recommended Posts

Hi,
I would have a question about searching and replacing: Where can I set that the search does not search the entire document, but only the area that I have selected and makes the changes.

I haven't found this setting yet. Require this function so that the entire document is not searched continuously in order to be able to make the changes only in this area.

With a brochure with over 100 pages, it is very tedious to constantly click through the results found in order to then be able to correct the correct points individually.

It would be better to select the text area, carry out searches and to be able to correct all found results at the same time with one command.

If this function is not available, I would be glad if you could add this function with the search area limitation.

Link to comment
Share on other sites

It can be done, but only using Regular Expressions, and, I think, only within a particular set of linked text frames (aka, a "story"). It would be better if there were a simpler way of doing it.

 

Assume that you have a set of linked text frames, and within that set you want to change ABC to DEFG. You can do the following:

  1. Insert a unique text string that doesn't appear elsewhere in the document at the beginning of the first text frame in the set. Perhaps something like AAAStart.
  2. Insert another one at the end of the last text frame in the set, say AAAEnd.
  3. In the Find and Replace panel, click the gear cog for the Find field and make sure that the Regular Expression option is selected.
  4. In the Find field, put:
    (AAAStart.*)(ABC)(.*AAAEnd)
  5. In the Replace field, put:
    \1DEFG\3
  6. Click Find, then Replace to work through the list.
  7. When done, you might do a Find again to make sure none were missed. And finally remove the AAAStart and AAAEnd tags.

Note that the AAAStart and AAAEnd strings should not contain any characters that are significant to Regular Expression parsing. if the "ABC" string contains any characters that are significant to Regular Expression parsing you will need to escape them with a \ or some other method.

 

-- 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

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.