Given this single-line input:
City, Country|[email protected]|john-doe-1234567|https://www.example.com/john-doe-site|john|doe|
I want to know if this is possible to grab the last two | characters - ie the pipes surrounding doe, but without matching doe.
I know the regex code to get all the | with (\n?)\|.
I've tried (?<=[a-z])\|\w+\| and (?<![a-z])\|\w+\|. The positive lookbehind and negative lookbehind both were closest I got but didn't hit the mark... In VSCode, I get something like this:
Currently, can not figure out a way where I get just the last two | characters without also returning a word that comes in-between the |.

|, capture the last 3 one by one. If you specify three|at the end of your regex, your "match all the|" part of the regex won't be able to match those, and will let your capturing group match and capture them (that said you "match all the|" regex doesn't seem correct, but i'm confident you'll find a solution by yourself)\|(?=(?:[^|]*\|)?[^|]*$)