Community
    • Login

    convert multiple columns to rows using notepad

    Scheduled Pinned Locked Moved General Discussion
    2 Posts 2 Posters 7.5k 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.
    • yuly pmemY
      yuly pmem
      last edited by yuly pmem

      Greetings friends, please how could I convert to rows using notepad?

      15 20 33 boy white journal
      20 11 28 girl yellow steven

      to
      15
      20
      33
      boy
      white
      journal
      20
      11
      28
      girl
      yellow
      steven

      Any friends idea?
      thanks you

      1 Reply Last reply Reply Quote 0
      • Terry RT
        Terry R
        last edited by Terry R

        This is very simple. I’m surprised you have not already figured it out. Basically (from your sample) you want to change all spaces to a carriage return/line feed. So each word will be on a separate line.

        The regex is:
        Find What: \h
        Replace with: \r\n
        As this is a regular expression you need the search mode in “regular expression” mode and have wrap around ticked.

        So the \h is a horizontal whitespace character: tab or Unicode space separator.
        The \r and \n are the carriage return and line feed characters.

        As a suggestion, read up on regexes by starting with:
        https://notepad-plus-plus.org/community/topic/15765/faq-desk-where-to-find-regex-documentation in our FAQ and also by using a regex tester (there are a few on the web) including the one mentioned in that post.

        It’s nice to see posters trying to find the solution themselves (especially one as simple as this one), then if in doubt or needing guidance, to come to the forum and show what they’ve tried and their samples.

        Terry

        1 Reply Last reply Reply Quote 4
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors