Mobile app version of vmapp.org
Login or Join
Dunderdale640

: Indesign grep replace question i am looking for GREP help. I have an issue where i need to delete every line that contains [DELETELINE]. So that [DELETELINE] TestText Test [DELETELINE] loremipsum

@Dunderdale640

Posted in: #AdobeIndesign #Grep

i am looking for GREP help.
I have an issue where i need to delete every line that contains [DELETELINE].

So that

[DELETELINE]
TestText
Test [DELETELINE] loremipsum
Example
[DELETELINE] loremipsum
loremipsum [DELETELINE]
[DELETELINE]


becomes

TestText
Example


I only can get parts of it to work. Like delete the line if [DELETELINE] is in the middle or in the beginning or at the end. But i need an expression that catches all cases.

Is that possible?

EDIT:

What i got is this:

^.+[DELETELINE].+r


But this selects only the third line.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Dunderdale640

1 Comments

Sorted by latest first Latest Oldest Best

 

@Dunderdale640

I think i found the answer

the following grep works for all cases

^.*[DELETELINE].*(r?|n?)


^ is beginning of a paragraph
r and n are different types of linebreaks so everything should be catched.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme