V
V
volt1112021-09-01 18:58:28
Regular Expressions
volt111, 2021-09-01 18:58:28

How to convert text using Notepad++?

previously deleting lines containing for example female or male

of the following form:

447769905417:100003159123411:Philip:Mullen:male:Rosyth:Dunfermline, Fife
:::::447769905427:1459931055:Rosie:Hawkley:female:Haslemere:Haslemere:Engaged:Chestnut View Home:7/10/2018 12:00:00 AM::
447769905432:100001631032812:Joshua:Martin:male:From, Somerset:Frome, Somerset::Blade Honda Chippenham:::
447769905434:100005728414220:Mark:Evans:male: ::Married:Warburtons:1/1/0001 12:00:00 AM::
447769905445:100012546100772:Jill Cleve:Davies:female:::::::
447769905446:514970218:Peter:Smith:male:Magor, Monmouthshire: Leicester, United Kingdom::Rolls-Royce plc:1/10/2018 12:00:00 AM::
447769905451:100000554851956:Sandip:Patle:male:Brighton:Nagpur:Single:Hilton Hotels & Resorts:::
447769905455:100002092379266:Si:Gibbon:female:::::1/1/0001 12:00:00 AM::
447769905457:100017427163384:Harry:Clements:male:::::9/22/2017 12:00:00 AM::
447769905464:1701215861:Louise:Dews:female::::Self-Employed:5/3/2018 12 :00:00 AM::
447769905471:538666210:Thomas:Dawson::Woking:Woking:::4/13/2016 12:00:00 AM::

do this:

Philip Mullen;100003159123411
Rosie Hawkley;1459931055
Joshua Martin;100001621
Mark Evans;100005728414220
Jill Cleve;100012546100772
Peter Smith;514970218
Sandip Patle;100000554851956
Si Gibbon;100002092379266
Harry Clements;100017427163384
Louise Dews;1701215861
Thomas Dawson;538666210

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Saboteur, 2021-09-01
@saboteur_kiev

Replace
^([^:]*):([^:]*):([^:]*):([^:]*):.*
with
$3 $4:$2

G
Grigory Boev, 2021-09-02
@ProgrammerForever

Import into Excel, there is an opportunity to choose a separator, and then do whatever you want with the data (sort, change the order of columns, etc.)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question