Question

I have text like this:

0;Anguilla;
0;Antarctica;
0;Antigua And Barbuda;
0;Argentina;
0;Armenia;

just like 300 Countries more... I want to copy the Country Name between the two semicolons and add it to the end of the particular Line.

So it looks like this

0;Anguilla;Anguilla
0;Antarctica;Antarctica
0;Antigua And Barbuda;Antigua And Barbuda
0;Argentina;Argentina
0;Armenia;Armenia

I tried something like this

/;.*?;/

but that doesn't seem to work.

Was it helpful?

Solution

You are near to the solution, all you need is a capturing group:

search:  ;(.*?);
replace: $0$1

OTHER TIPS

In Notepad++ you can do this with Ctrl+H

Find What : (0;(.+?);)

Replace With : \1\2

Click Replace all. Make sure you have 'Regular Expression' Selected

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top