Copy link to clipboard
Copied
Hi guys. GREP (sigh)...
I need to remove the empty lines after datamerge for certain products. The checkbox to delete blank lines will not work in this case. I have tried to get the grep correct but to no avail, please can someone help. In my eg i need the "Black" to move up.
thanks
/G
okay... it seems that:
\s+$
works.
Thanks
Copy link to clipboard
Copied
Hi Grant,
In Find Grep, use find what as following
^\r
and leave the change to as blank, this should hopefully work if i understood your requirement properly
-Manan
Copy link to clipboard
Copied
Hi Manan, no that wont work it still would leave the paragraphs that have a tab for instance.
Copy link to clipboard
Copied
This. Saved. My. Life. Thank you!
Copy link to clipboard
Copied
okay... it seems that:
\s+$
works.
Thanks
Copy link to clipboard
Copied
Sorry, I thought you just wanted to remove paragraphs that had nothing. However your grep expression will not work in some cases like
I would suggest you to use the following expression
^\s*\r
This will start from the start of the paragraph, make sure either the paragraph is empty or has one or more whitespace characters only and then it is followed by the paragraph end character
-Manan
Copy link to clipboard
Copied
Hi Manan, the problem with that is it assumes the paragraph style from the text above the blank lines. also the \s+$ grep doesnt match the eg you mentioned:
as can be seen here after running the \s+$ grep. Even if there is abc tab tab paragraph.
Copy link to clipboard
Copied
Hi Grant,
I think there is some gap in what you and i are doing, please see the screengrab of how i am testing. Notice that using your grep expression the paragraphs with Hello and the other second para is also getting selected. With the expression i gave only the blank para is selected and also i could not reproduce the issue with paragraph style being changed.
-Manan
Copy link to clipboard
Copied
Hi bud. I watched the vid. and even in your eg only the white space is selected which is perfect. I think a normally written paragraph and using data merge which adds in hidden conditional text may have something to do with it.
thanks
Copy link to clipboard
Copied
Hi Grant,
I suggest you'd make a sample text frame available for testing.
Could be even a IDMS file with Dropbox or a similar service.
Thanks,
Uwe Laubender
( ACP )
Copy link to clipboard
Copied
Hi Laubender,
the grep i "stumbled" (cause i suck at it) seems to work perfectly for what I am doing so all good for now.
thank you