Finding end of line with specific character right after
-
Hello,
I have been searching the internet for a while now and I cannot seem to find a solution for my problem. I am trying to target line breaks that contain a specific character in the new line right after to replace that by something else.
For example, my text looks like:
This is an example text
@ and this is a new lineAnd I want it to look like:
This is an example text and this is a new line.
So I want to delete line breaks only if the next line begins by “@”.
The solution must be pretty simple but I am a little noob, so any help would be highly appreciated.
Thanks in advance!
-
Using “find and replace”. Select ‘Extended’.
Search for \n@ and replace with nothing or space.
Assuming you use Linux End Of Line. If you use Windows EOL search for \r\n@. -
I had tried \r\n @, with an empty space between the “n” and the “@”. Don’t really know why I put the space there.
Thanks for your help!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login