Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Finding end of line with specific character right after

    Help wanted · · · – – – · · ·
    2
    3
    1715
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Ger PG
      Ger PG last edited by

      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 line

      And 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!

      1 Reply Last reply Reply Quote 0
      • gstavi
        gstavi last edited by

        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@.

        1 Reply Last reply Reply Quote 0
        • Ger PG
          Ger PG last edited by

          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!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright © 2014 NodeBB Forums | Contributors