Paul
Paul

Reputation: 3

Notepad++ how to swap characters in a string

I have a computer generated text file. I need to swap positions of certain entries. These entries are always 4 characters long and separated from the rest by semicolons. The 4th character needs to become the first character.

For example:

;1234; 

has to become:

;4123;

Note: There's a lot of other text separated by semicolons, but only these are exactly 4 characters long. The rest is longer or shorter

Upvotes: 0

Views: 1170

Answers (1)

Toto
Toto

Reputation: 91385

Have a try with:

Find what: ;(\d\d\d)(\d);
Replace with: ;$2$1;

Upvotes: 1

Related Questions