That's not what he wants to do. He wants to preserve all of the pipes, and
insert a space between any two consecutive pipes with no other data between them.
Presumably the position of his toks must be maintained.

I am still struggling with regex, but this seems to work:
Code:
alias TR {
  var -s %test = |a|b|c||||d|||e|||
  var %testReg = /\|(?=\|)/Sig
  noop $regsub(Blah,%test,%testReg,$+($chr(124),$chr(32)),%TestOutput)
  /echo -ag %Testoutput
}

Last edited by LonDart; 22/09/07 08:28 PM.

LonDart