I have a list that is something like:
xxxxx|xxxxxx|xxxxx@example.com
xxxxx|xxxxxx|xxxxx@example.com
xxxxx|xxxxxx|xxxxx@example.com
The x's can be both letters and numbers, but nothing else.
What I am trying to do is replace everything (including the character) to the right of the second |
. The outcome should look like:
xxxxx|xxxxx
I want to do it with regex so that I can replace all the occurrences in Notepad++.
Replace \|[^\|]+$
with nothing.
This will match |xxxxx@example.com
, so if you replace it with a blank string, that will accomplish what you want.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.