Of course ... I kind of figure it out after I post.
The copy that came in has "italic" in all caps ... "ITALIC" .... or most of them are anyway.
It didn't occur to me case would matter.
Thus ... I pose a replacement inquiry .....
How might I search for "italic" ... disregarding case? The editor doesn't always key them in with the cap lock on.
Thanks in advance to any and all.
And I've now found this as well. Sorry all.
That at the beginning makes the expression ignore case.
Here is the finished expression that finds "(italic)", regardless of case:
You don't need GREP for this
and don't make it case sensitive
(the case sensitive button is the one marked as "Aa" in an icon)
Thanks for chiming in.
I guess maybe I should further elaborate my purpose. I was trying to limit my question to precisely the issue I was facing. Apologies. Long story short, do to my needs, I have to do this in the GREP tab.
What I'm really trying to do is find this:
(italic)funky text here(end italic)
and change it to this:
funky text here
... in many, many stories in long documents, and obviously, the text is never the same. This (italic) business is the way we receive the copy, since formatting is often dropped. So it's way for the designers to know where italic is intended.
As such, I need to use the GREP dialog, rather than the Text tab, due to the variable text.
I now know the answer to find the above query is:
While we're on the subject, does anyone possibly know how to search for the original query, and tehn shave off the (italic) and (end (italic) in one find/replace? I may post this to another question if I don't figure it out.
i.e. ... can I save the text that's returned from:
And reference it in the "replace" field?
Right now my solution to this issue is doing 3 find/replaces:
GREP search for: ... (?i)\(italic\).*\(end italic\) ... changing format to "italic."
Then, Text find/replace to remove (italic) and then again for (end italic)
1 person found this helpful
Aww, you were this close.
-- note the extra set of normal (not escaped) parentheses around the inner expression --, then replace with
to replace with just Found Group #1, and applying your Italics in the Change to.
You .. are .. the .. man.
Thanks for elaborating on the use.
For future reference it helps to have a clear and concise of what you are looking for and what you intend to do.
Well that GREP from Jongware will certainly help you speed things up
Jongware et al,
And, of course, there are always little cracks where things fall through.
I ran into an issue with the following:
(ITALIC)denied(END ITALIC) services can be appealed, whereas these services were (ITALIC)covered(END ITALIC)
It seems to be applying the change to EVERYTHING in the middle of that phrase ... so it yields this:
denied(END ITALIC) services can be appealed, whereas these services were (ITALIC)covered
Any clues on how to get around such a peculiar instance? I'm sure there must be something.
Sorry on all the questions.
1 person found this helpful
Try (?i)\(italic\)(.*?)\(end italic\)
That's perfect Peter, THANK YOU.
What does that additional "?" signify?
That's fantastic. Noted. Thanks so much again.
I recommend Peter Kahrel's little ebook primer on Grep In InDesign. It's about $10.
Yes, saw that in a couple of related posts. I'll be buying that directly. Thanks again.