Search code examples
regextextnotepad++

Move all text between two "\t" in Notepad++


I have more than a million lines of text in this format:

AAAA BBBBBBBBBBBBBBB CCCC

Separated by \t

I want to have it in a format

AAAA_CCCC BBBBBBBBBBBBBBB

But I cannot seem to figure out how to do it using regular expressions in Notepad++


Solution

  • You may try the following find and replace, in regex mode:

    Find:    ^(\S+)\t(\S+)\t(\S+)$
    Replace: $1_$3 $2
    

    Here is a demo.