Here... I wrote this eons ago for dealing with switches...

Code:
ALIAS PARSEFLAGS {
  var %switch,%chars,%count,%list,%length,%char

  if ($left($1,1) !isin +-) { return }
  %switch = $left($1,1)

  if ($2 != $null) { %chars = $2 }
  else { %chars = abcdefghijklmnopqrstuvwxyz }

  %length = $len($1)
  %count = 0

  while (%count < %length) {
    inc %count
    %char = $mid($1,%count,1)
    if (%char isin +-) { var %switch = %char }
    elseif (%char isletter %chars) { %list = %list %switch $+ %char }
    elseif ((%char isnum) && (%list != $null)) { %list = %list $+ %char }
  }
  return %list
}


It parses -act5s to -a -c -t5 -s. You should be able to figure out what to do from there.


Beware of MeStinkBAD! He knows more than he actually does!