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

1 Answer 1


Try this:


Replace by nothing.

  • 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, 2018 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, 2018 at 14:09
  • You're very welcome
    – Vinny
    Jan 30, 2018 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, 2018 at 9:03
  • @JKCapeTown You should start a new question
    – Vinny
    Jun 26, 2018 at 14:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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