Regex for remove everything after | (with | )
The pipe, |, is a special-character in regex (meaning “or”) and you’ll have to escape it with a \. Using your current regex: \|.*$ I’ve tried this in Notepad++, as you’ve mentioned, and it appears to work well.