How to remove all text between certain characters in notepad++?

There is a csv file with delimited "semicolon".
Description1 | Code1;Description Of 2 | Code2;Описание3 | Код3;Description The 4 | Kod4;

Tell me how to remove the description (spaces included) and leave only the codes, separated by semicolon?

Ie you need to delete the entire text starting from the character "semicolon" and ending with " | "symbol.
March 12th 20 at 08:39
2 answers
March 12th 20 at 08:41
Press Ctrl + H
Search mode: regular. pronounced.

in the find what field:

in the box to replace what is replaceable, the spacebar for example

next, manually remove the description at the beginning and a semicolon at the end
Thank you! Only replace the need to "semicolon" to keep the csv structure - leora.Kshlerin26 commented on March 12th 20 at 08:44
March 12th 20 at 08:43
I have not installed Notepad++, but I think so:
regexp (^|;).*\| replace with (whatever group notepade marked?) \1 or $1

Find more questions by tags Notepad++Regular expressions