Ask Your Question

Search and Replace $ doesn't work.

asked 2017-12-27 23:23:57 +0100

Kennin gravatar image

So I've got a document of 270 pages. There are a lot of useless returns as well as spaces in the beginning of lines. I need to get rid of those, but it takes me a huge amount of work. I'd rather have that easier.

I turned on "regular expressions" and trying to replace line breaks. Neither $ nor \n work. I even installed Alt Search extension, but that didn't help either.

Any ideas?

edit retag flag offensive close merge delete


Please provide a test document (put it to some file sharing service like, and update your question with a link). It definitely should work with either $, or \n regex.

Mike Kaganski gravatar imageMike Kaganski ( 2017-12-27 23:26:59 +0100 )edit

Is it enough if it's only available for 7 days? Then I can use WeTransfer.

Kennin gravatar imageKennin ( 2017-12-27 23:55:40 +0100 )edit

It's OK for me. If I'll be unable to help, it will depend on when another one will want to try to help...

Mike Kaganski gravatar imageMike Kaganski ( 2017-12-28 00:01:50 +0100 )edit
Kennin gravatar imageKennin ( 2017-12-28 00:16:30 +0100 )edit

It works for me with regular built-in Search&Replace. I put a single $ into search box, and nothing to replace box, and check regular expressions; replace all joins all paragraphs.

Mike Kaganski gravatar imageMike Kaganski ( 2017-12-28 07:33:36 +0100 )edit

Thanks, that works indeed. But that's not a solution. I need $ + space to work, but it doesn't.

Kennin gravatar imageKennin ( 2017-12-28 20:33:00 +0100 )edit

Ah! So that's unclear problem specification then. Yes, AltSearch works then.

Mike Kaganski gravatar imageMike Kaganski ( 2017-12-28 20:45:11 +0100 )edit

1 Answer

Sort by » oldest newest most voted

answered 2017-12-28 02:26:25 +0100

Jim K gravatar image

updated 2017-12-28 02:34:36 +0100

With AltSearch installed, go to Edit -> Alt. Find & Replace. In the Search for box, enter \p (or find it in the Regular dropdown menu).

Then press Replace All. In your example document, this removed all of the paragraph breaks.

Similar questions:

edit flag offensive delete link more


gabix gravatar imagegabix ( 2017-12-28 07:10:55 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-12-27 23:23:57 +0100

Seen: 430 times

Last updated: Dec 28 '17