InDesign CS3 GREP

jlt's picture

So, we've gotten our upgrade to CS3 and there are many improvements.

However, one thing I was looking forward to in the new ID find/change doesn't seem to behave as the manual advertises.

I am using the great new grep tool to find situational changes - in this case, a hyphen between numerals, so that I can change the telephone numbers' style to period-separation. So far, so good.

If I then make the change to period, the found numerals surrounding the hyphen are changed too. Not so good. Manual says to insert the found text variables there, which is basically a stop-change order; I try that, and the actual "found text" string, automatically inserted by the program, is inserted into the text ($01, $02, etc). Not so good either.

If anyone here can guide me as to how to correctly use this tool, I would be much obliged. An illustration is included so that you can see my mistake.

Picture 1.png86.34 KB
Bert Vanderveen's picture

Maybe Adobe's InDesign Forum is a better place to post your question:

(Free registration required — the Scripting section is also useful)

jlt's picture

good idea - thanks!


jlt :

vincentg's picture

I think you're supposed to enclose your \d in parentheses, like so: (\d)-(\d). Not tried this myself in ID obviously; only used to using GREP in other applications.

Miguel Sousa's picture

Joshua, I understand your pain. Regular expressions (GREP) are a very powerful mechanism, but at the same time they're also hard to master.

The case you're trying to match is actually one of the sample queries InDesign provides. I tried it out and it worked like a charm :)

Miguel Sousa's picture

BTW, alternatively to InDesign's provided expression on the "Find what:" field, you can use this one: (\d{3})-(\d{3})-(\d{4})

I think this one is more intuitive* and does exactly(?) what you want. Translating it to English it means:
— Find a group of 3 digits;
— followed by a hyphen;
— followed by another group of 3 digits;
— followed by a hyphen;
— followed by group of 4 digits.

Then the expression in the field "Change to" means:
— What was found in group 1;
— follow it by a period;
— follow it by what was found in group 2;
— follow it by a period;
— follow it by what was found in group 3.

Simple, eh? ;^)

* The expression that comes with InDesign will match more cases, though; it will find and replace occurrences that have a hyphen, a period, a space, or nothing, between the groups of digits.

Miguel Sousa's picture

As far as I've seen, all the US phone numbers follow the format 3-3-4, but what if that's not always true? Then you can use this expression: (\d+)-(\d+)-(\d+)

The plus sign (+) means "Find one or more of the previous". So in this case it's matching one or more digits.

(I'll stop now :^)

jlt's picture

Miguel, you are - as always - a scholar and a gentleman. Thank you for teaching me a bit about GREP - this sounds like it will be tremendously useful in formatting & cleaning up long documents.


jlt :

Miguel Sousa's picture

You're welcome. GREP is indeed very useful, and it's not hard to imagine that more people will be faced with problems similar to yours as they move to CS3 and try to use InDesign's GREP functionality.

Having said that, I suggest that you change the thread's title to "InDesign CS3 GREP" or something, so that other people easily find this thread and use it to post their questions.

Linda Cunningham's picture

Miguel, all North American and Caribbean phone numbers follow that convention, but anywhere else, there's going to be "issues."

jmickel's picture

Hey Miguel, any news on Adobe fixing their 'updated' undo function in Indesign CS3? Now when you go in and out of the preview mode or turn the guides on or off, it counts as an undo.

I like CS3 A LOT, except for that one inconvenience.

Miguel Sousa's picture

> Now when you go in and out of the preview mode or turn the guides on or off, it counts as an undo.

Didn't know about that problem. If the people on the InDesign team know about it, you can be assured that they're working on fixing it. I don't know when the update will be released (and even if I did I wouldn't be allowed to say; sorry).

jlt's picture

I noticed that the functionality to build a booklet had been stripped from IDCS3, leaving behind only the option to print/export-to-pdf-or-ps an imposed booklet. Do you know if this was simply a move to protect the sales of a plugin, or is that functionality simply relocated? I'm always surprised when a particularly helpful part of a program is removed in an "upgrade."


jlt :

Miguel Sousa's picture

You mean, why was "File > InBooklet SE..." in CS2, replaced by "File > Print Booklet" in CS3? I don't know.

I actually never had the need to use this feature. Comparing the two I see that the CS3 version does not have the option "Create New Document", which is what you're asking about, I believe. I don't know why that change was made.

Was the ability to have your InDesign document in an imposed form an important feature for you? I assume you'd use such files just for printing, and that all the changes/corrections would be made in the original version, no? If so, then the lost of functionality is not that big, IMO.

jlt's picture

I needed to be able to send the imposed live files to my production supervisor on a regular basis, so yes, it was a big deal.

This was a tremendously useful feature for me, and now our production staff may decide that I should stick with CS2 and not upgrade until a plugin that handles this is available (although I think there may be a version of inbooklet for CS3 already).

But this is not the place for these discussions.



jlt :

Miss Tiffany's picture

Josh, here is a link to Bug Report/Feature Request form.

Thomas Phinney's picture

The InBooklet SE plug-in was removed because it was a "light" version of a third-party plug-in from ALAP... and Quark bought ALAP and immediately discontinued all the company's InDesign plug-ins. (One assumes that there was no way to get Quark to provide the plug-in.)



Miguel Sousa's picture

(Joshua, you've just hijacked your own thread :^)

I did a search and found this long-long thread on InDesignSecrets: Print Booklet in InDesign CS3. Towards the bottom of the page there's a reference to a shareware script named Booklet CE.

k.l.'s picture

Thanks, great link!

Syndicate content Syndicate content