質問

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.

役に立ちましたか?

解決

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

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

他のヒント

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

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top