1

I'm having some issues with Notepad++ at the time of copy (cut) columns into the same document.

For example I have this:

Example #1

And I need this:

Example #2

But at the moment I use Alt+Shift and arrow keys to copy the first column and paste it at the end I get this:

Example #3

So I'm not sure if there is an issue with blank spaces or something like that, This document is 14mil lines so I can't do it manually...

If there is a solution with other software rather than Notepad++ I'm willing to hear proposals.

1
  • Ultra Edit is has a function to edit columns.
    – anon
    Commented Mar 7, 2023 at 17:13

1 Answer 1

1

This can be done by using the text replacement dialog (Ctrl+H).

Find what: :(\d*) (.*)
Replace with: \2:\1
Check: "Regular expression"
Click "Replace All".

Explanation:

  • (\d*) : first group consists of digits
  • (.*) : second group contains any character
  • \2:\1 : second group, followed by colon, then by the first group

I assumed that a blank follows the first group. If it's rather a tab character, replace the Find string with :(\d*)\t(.*).

1
  • Wow you are it worked perfectly! Thanks Commented Mar 7, 2023 at 17:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .