in reply to Re^2: How to clean an array of strings after a split
in thread How to clean an array of strings after a split

(?: non-capturing parentheses ^ start of string | or \| pipe character )
(?= look-ahead, not part of match $ end of string | or \| pipe character )

So I am looking for something between the start of string or a pipe and a pipe or the end of the string, ignoring whitespace, matching non-greedily. In order to make it work, I need to use each pipe twice, once for the string before the pipe, and then for the string following it. Thus the look-ahead assertion. HTH.