Gotta love Regex for stuff like this:

Code:
alias TR {
  var %test = |a|b|c||||d|||e|||
  var %testReg = /\|{2,}/Sig
  noop $regsub(Blah,%test,%testReg,|, %TestOutput)
  /echo -ag %Testoutput
}


Result: |a|b|c|d|e|

Also, it won't matter how many | you have in a row in this case. As long as there are 2 or more, it'll replace them with a single |

Last edited by Thrull; 22/09/07 12:59 AM.