Community
    • Login

    How do I go from A<CR><<LF>B<CR><LF> to 'A','B' ?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    6 Posts 2 Posters 4.3k Views 2 Watching
    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.
    • Jim BiwerJ Offline
      Jim Biwer
      last edited by

      How to I quickly change (search/replace):

      A<CR><LF>
      B<CR><LF>
      C<CR><LF>
      D

      to

      ‘A’,‘B’,‘C’,‘D’
      ?

      I have done it before using Ultra Edit, but I am new to N++.
      Thank you!

      Claudia FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC Offline
        Claudia Frank @Jim Biwer
        last edited by

        Hello @Jim-Biwer,

        by using regular expressions and find/replace dialog.

        CTRL+H
        check regular expression (bottom left)

        find what:(.*)\r\n
        replace with:‘\1’,

        (.)\r\n = you are looking for text which end with CRLF
        (.
        ) = holds the text without the eol chars
        \1 = what (.*) returns
        encased by quote and added a comma as you’ve told.

        It results in ‘A’,‘B’,‘C’,‘D’, so you need to delete the last comma manually.

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 0
        • Jim BiwerJ Offline
          Jim Biwer
          last edited by

          Thanks, I will give it a try.

          1 Reply Last reply Reply Quote 0
          • Jim BiwerJ Offline
            Jim Biwer
            last edited by

            Got it, works good. Thank you!

            1 Reply Last reply Reply Quote 0
            • Jim BiwerJ Offline
              Jim Biwer
              last edited by

              Yes, works great. Thank you.

              1 Reply Last reply Reply Quote 0
              • Jim BiwerJ Offline
                Jim Biwer
                last edited by

                In Ultra Edit, I would search for ^p and replace with ‘,’

                Thanks again. Solved.

                1 Reply Last reply Reply Quote 0

                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
                • First post
                  Last post
                The Community of users of the Notepad++ text editor.
                Powered by NodeBB | Contributors