notepad++ CSV word replace

Status
Not open for further replies.

010010

Reputable
Jun 29, 2016
631
8
5,365
Hello, i am editing a Text file in order for it to comply with the CSV syntax needed for Envoy; unfortuantley the long list of Names, numbers and email addresses is in the wrong order, it should be as follows:

First Last, Email@Domain.co.uk, PhoneNumber

At the moment it is in this format:

First Last, PhoneNumber, Email@Domain.co.uk

i am using Notepad++ and i am aware of "CTRL+H" but not sure of how to use it in this situation. Any suggestions would be much appreciated. Thanks.
 

randomizer

Champion
Moderator
You can try using the regular expression find/replace to rearrange the file. Something like this might work:

Find:
[fixed]^([^,]*),([^,]*),(.*)$[/fixed]
Replace:
[fixed]\1,\3,\2[/fixed]

This has only been lightly tested. It'll be simpler and more reliable to do it in Excel if you can.
 
Status
Not open for further replies.