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 3.8k Views
    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
      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
        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
          Jim Biwer
          last edited by

          Thanks, I will give it a try.

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

            Got it, works good. Thank you!

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

              Yes, works great. Thank you.

              1 Reply Last reply Reply Quote 0
              • Jim BiwerJ
                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
                • First post
                  Last post
                The Community of users of the Notepad++ text editor.
                Powered by NodeBB | Contributors