Skip to main content
Inspiring
August 24, 2018
Answered

Grep: Delete the whole line of any words.

  • August 24, 2018
  • 1 reply
  • 2034 views

Hi guys,

Is it possible in Grep to delete the last line?

Thanks

This topic has been closed for replies.
Correct answer Laubender

Hi Uwe,

How this could work with paragraph grep style?


Hi,

you cannot remove something using a GREP Style.

If you like you can make it invisible using e.g. a character style that applies No Fill and No Stroke, but you cannot remove it.

Regards,
Uwe

1 reply

sarahkayAuthor
Inspiring
August 24, 2018

Sorry - should be last line with keyword "Phone"

Community Expert
August 24, 2018

Hi,

if you find a pattern that describes all lines you want to remove starting with "Phone:" you can do this with GREP Find/Replace.

And if all the lines share the same paragraph style, the better you will be able to find the right lines.

A possible GREP pattern could be:

\s?Phone:\s\d{2}\s\d{4}\s\d{4}

Since you were showing an example without turning on Hidden Characters I cannot tell if this will work since I do not know if white space of any kind is following after the last sequence of numbers.

Regards,
Uwe

sarahkayAuthor
Inspiring
August 28, 2018

Hi Uwe,

How this could work with paragraph grep style?