1

How do you set up a find and replace GREP string to find in your document any line of copy (separated by 2 hard returns) that consist of a 'zero, space, wildcard word(s), hard return?

In the attached image it needs to find the:

0 civil

0 civil & criminal

but leave the:

4 criminal

1 cease & desist

2 pre action

Essentially, I'm trying to automate the deletion of any line of copy that has a zero value. (I have close on a hundred of these docs to edit) Any ideas?

Thanks JK

enter image description here

2

Try this:
Find:

^0.+\v

Replace by nothing.

5
  • 1
    Could you break down the code a bit for me: what does it mean, what is it telling indesign to do? Thanks again. – JKCapeTown Jan 30 '18 at 14:03
  • Sure...^ means beginning of the paragraph, then 0 (zero) then any characters repeating (.+) and finally vertical space (\v). That includes soft and hard returns. – Vinny Jan 30 '18 at 14:09
  • You're very welcome – Vinny Jan 30 '18 at 14:17
  • Vinny, I hope you're online. Can you help me again? I have a text box with a hundred odd phrases listed, each on a new line separated by a hard return. I'd like to insert a " at the beginning and end of each phrase? Clever GREP solution for this? Thanks. – JKCapeTown Jun 26 '18 at 9:03
  • @JKCapeTown You should start a new question – Vinny Jun 26 '18 at 14:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.