Skip to main content
Inspiring
Nov 8, 2018 9:38 PM UTC
Answered

Find hard return, replace with soft return

In the attached image there are 2 paragraph styles: TRIP NAME (line 1) and DETAILS (lines 2 and 3).

I am trying to find the first hard return in every paragraph using the DETAILS paragraph style and replace it with a hard return. In this case, it would be the hard return after "Avid".

Any idea how I could do this with GREP?

    This topic is closed to new replies. Start a new post to keep the conversation going.
    vladan saveljic
    vladan saveljicCorrect answer
    Inspiring
    Nov 9, 2018 9:07 AM UTC

    try this grep

    find:

    .+\K\r(?=.+)

    format:

    DETAILS

    replace with:

    \n

    4 replies

    dave c courtemanche
    Inspiring
    Nov 9, 2018 8:46 PM UTC

    You might also explore the new features in CC2019 where you can change the spacing between paragraphs using the same style. This is how I control a large space after a list of bullets.

    Translate
    vladan saveljic
    vladan saveljicCorrect answer
    Inspiring
    Nov 9, 2018 9:07 AM UTC

    try this grep

    find:

    .+\K\r(?=.+)

    format:

    DETAILS

    replace with:

    \n

    Translate
    FRIdNGE
    Nov 9, 2018 11:05 AM UTC

    \r(?=.)  will be enough! …

    Translate
    vladan saveljic
    Inspiring
    Nov 9, 2018 11:26 AM UTC

    I thought so too

    then I thought if there are  empty lines with "DETAILS" paragraph style (wrongly applied)  that he doesn't want to eliminate

    Translate