regex matching a string with no single quotes in powershell

Hi I'm trying to create a script in powershell that finds a string in a file and then modifies it but I'm having issues matching the string I want.
So, I'm trying to make sure that I can find this type of string
|d where d is is any digit, the string must not be in single or double quotes.
SO I'd like to match |1 or |12 or |333
So far this is what I have:
\|[0-9]+ is returning strings with or without single quotes around it, so |1 and also '|5';
\'\|[0-9]\'+ returns only strings with single quotes around it, so matches '|4' but not |3
\\'|'(?:\\'|[^'])*'|(\[0-9]+) as the first one, it is returning strings with or without single quotes around it, so |1 and also '|5';
\[^']\|[0-9][?']\+ I thought this would say something like exclude ' at the beginning and at the end of the string, but it doesn't work at all
Now, you might have understood that I really don't know much about regex, so I'm trying options in the online regex checker here https://regex101.com/ but it appears to be behaving slightly different than powershell.
Now, what do I have to do to match a string without the quotes? I don't necessarily want the solution, but perhaps some hint would be appreciated :-)