This should work:
^[0-9]{5,6}(\|[0-9]{5,6})*$
Explaination:
^ = start of line
[0-9] = Any digit ( \d will work too)
{5,6} = Either 5 or 6 times
(...)* = Everything inside (), 0 or more times
\| = channel symbol
$ = End of line
Putting it together, this is โthe beginning of a line, followed by 5 or 6 digits, followed by the [channel symbol, followed by 5 or 6 digits] 0 or more times, followed by the end of the lineโ
source share