Mastering Find/Change
The more you understand this unsung hero, the more productive you’ll be!
Most of us take for granted the ability to search for text in a document—to locate an instance of a word or phrase each time it appears, and then change each found instance to a new word or phrase. This Find/Change feature alone is a lifesaver when you need to quickly and accurately locate and change content in a document. But InDesign, as you might suspect, boasts find/change capabilities far and above a mere exchange of text characters.
. . . .
This article is for members only. To continue reading, please sign in, or sign up for a membership today. Thanks for supporting CreativePro! CreativePro membership keeps you up-to-date with the technology, solutions, and resources to strengthen your professional development.
BECOME A MEMBER
For just $6.50/month (billed annually), you’ll get access to valuable benefits, including:
I tried the GREP find/change for numbered lists, and while it did find and apply the correct style, it did not delete the original number, so I have double numbers now – one that is part of the style, and one that is part of the list. What did I miss?
You actually didn’t miss anything Charlotte, it’s I who missed something. You can’t actually find and change content as well as apply formatting at the same time. You can actually see this when you have a formatting property applied, next to the words “Change to”, you’ll see a small “info” icon indicating that formatting attributes are defined. This means that anything you put in the “Change to” field won’t get applied. To actually remove the static numbers in the text, you’ll need to clear the formatting attributes in the “Change Format” section and perform a “change all” again.
Thanks for bringing this to my attention and I apologize for any confusion!
Thank you. It’s still a great time-saving tool.
Humm!
Hi! Are you talking about find manual numbering and replace it by auto-numbering para style deleting in the same time the previous manual numbering?
(^/)
[Sorry, I’m not a member!]
Yes, Obi-wan, that is what we are talking about. Finding the characters, removing them, then applying a numbered paragraph style to the found text.
So … 1 regex!
Find: ^[manual numbering](first char of the para between parenthesis)
Replace by: $1
Replace by Format: Auto-numbering para style!
I don’t know the “manual numbering”. So, replace: [manual numbering] by something lie this: \d+\.\h
(^/) :-)
That’s a great solution Obi-wan. So Charlotte, I need to clarify what I said in my reply to you. When you don’t define anything in the Change to field, only formatting is applied. The challenge in this case is that we want to remove the manual formatting but don’t want to replace it with anything. What Obi-wan pointed out is a creative way to achieve both removing of the manual numbering and formatting all in one execution.
Here’s how to do it:
In the Find What field, enter \d+\.\s(\u)
This looks for the same string of characters we were looking for before but also “grabs” the first uppercase letter after the number. In the Change to field, type $1 which puts back whatever uppercase letter is appearing as the first character of the paragraph. Now define the paragraph style you want to apply in the Change Format section. Pressing Change all now removes the manual numbering and applies the formatting in one query.
Thanks for sharing this with us Obi-wan!
MTFBWY!
(^/)
This is a list cleanup GREP Find/Change that I run after formatting either numbered or bulleted lists (it works on both) with the correct paragraph style that automatically applies bullets/numbering. It will remove numbers, bullets, and/or spaces at the beginning of the paragraph.
Find what: ^(\x{00B7}|~8|\d{1,}\.?\)?)[\t\s]+(.+)
Change to: $2
Sir, I want to Find Text and Replace with Image (TIF) file
and its multiple find and replace required…
Is it possible ?
@Bhadresh: Copy or cut the image using the black arrow, then replace with the “clipboard content”.
Thank you very much Sir…
I already done it…
but, i want to find and replace variable…
ie. replace text BALL with Ball Image
then…
replace text BAT with Bat Image
then…
replace text STAR with Star Image…
thus.. onwards…
I don’t know of a way to automate this if that’s what you mean. Because you’re doing a “replace” with the contents of the clipboard as described in Jean-Renaud’s post, you can’t capture that clipboard contents for re-use. I’d be interested to know of Obi-wan or someone else has a solution to this.
Sounds like you want Swimmer: https://www.rorohiko.com/wordpress/2014/06/24/peoples-choice-indesign-script-pepcon-2014-replace-words-images-vice-versa/
or perhaps this one: https://kasyan.ho.com.ua/place_images.html
Hi Chad [Bhadresh again!],
A cool friend [ I hope he is! ;-) ] wrote sooner:
“That is possible, but it would take some time to develop, so I would have to charge for it. Please contact me…”
My email is: [email protected]
(^/)
Obi-wan: LOL. :-)
Sure and Thanks Obi-wan Kenobi Sir
Thanks and Namaste Hon’ble Shri David Blatner Sir…
My Great Pleasure to have words from you…