V
V
volt1112021-12-17 11:22:01
Regular Expressions
volt111, 2021-12-17 11:22:01

How to convert multiple columns using Notepad++?

this format:

login: Carlita170
password: 5onbec
mail: [email protected]

login: Paulene088
password: 1p5pg
mail: [email protected]

login: Jude425
password: ufrvi
mail: [email protected]


into these:

[email protected]:Carlita170:5onbec
[email protected]:Paulene088:1p5pg
[email protected]:Jude425:ufrvi

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
dollar, 2021-12-17
@volt111

Find: login: ([^\r\n]+)\r?\npassword: ([^\r\n]+)\r?\nmail: ([^ \r\n]+)\r?\ n?
Replace with: \3:\1:\2

picture
61bc4b36bcba7046303144.png

S
SOTVM, 2021-12-17
@sotvm

first remove login: password: mail:
find: ^.*:\s
replace (empty)
i.e. we get
Carlita170
5onbec
[email protected]
then merge into one line, replacing the line feed with :
we get:
Carlita170:5onbec:[email protected]
and only then arrange mail:login:pass in the desired order in this line
find ^(.* ):(.*):(.*)$
replace with \3:\1:\2

S
Shellr57s, 2021-12-17
@Shellr57s

login:\s(.*)(\r?\n?)password:\s(.*)(?2)mail:\s(.*)(?2)
$3:$1:$2

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question