MacMost Q&A Forum • View All Forum QuestionsAsk a Question

How Do I Find and Replace Multiple Paragraph Returns In Pages?

I am working on a long Pages document which mainly consists of text copied and pasted from a TextEdit version which was probably a Word document attached to an email. It contains lots of series of paragraph return symbols to create new pages. Pages ‘Find & replace’ feature doesn’t seem to accept these ‘invisible’ characters either when I try to insert them in the ‘Find’ or ‘Replace’ by pressing the Return key or by copying & pasting paragraph return symbols in the text. I would prefer not to have to go through page after page highlighting and deleting all the redundant symbols. Am I not using ‘Find & replace’ correctly or is it not that sophisticated? Pages Help does say that characters can be found and replaced. Is there some way round this or another solution or editing application I can use with Pages?

—–
David Girling

Comments: One Response to “How Do I Find and Replace Multiple Paragraph Returns In Pages?”

    7 years ago

    Yes, you can do this. The trick is knowing how to "type" the Return into the Find & Replace field. If you hit the Return key on your keyboard, it doesn't work. If you try to copy the empty space at the end of the line, it doesn't work.

    Coders know the secret. The "character" at the end of a line is a "newline" character. But it is invisible to you in Pages. Even that little Paragraph mark isn't really it -- that is just indicating that there is a line break and it really isn't "there" for you to select.

    Try using \n -- that's a backslash character, followed by the letter n. Coders use the backslash to indicate that the next character is not the normal letter, but a special symbol. So \n stands for the newline character. If you search for \n in Pages, you get the returns between lines. Another example is \t which is a tab character.

    Now if you want to remove all of the times that more than one return is used to create blank lines, then search for \n\n and replace with \n. Do it once, then again, then again. When no more are found, then there are no more back-to-back newline characters and no more blank lines.

Comments Closed.