Reputation: 79
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.
Upvotes: 0
Views: 1261
Reputation: 47824
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
Upvotes: 1
Reputation: 89584
You are near to the solution, all you need is a capturing group:
search: ;(.*?);
replace: $0$1
Upvotes: 2