You can avoid consuming the trailing pipe with a lookahead:
Hugos{ \| 9 [0-6] (?= \| ) # followed by another pipe }{|x}xg;
In reply to Re: Replacing consecutive tokens in 1 pass
by hv
in thread Replacing consecutive tokens in 1 pass
by aarestad
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |