Looks like I just needed an extra set of parenthesis in the $regex, it works now.

Edit: It seems to only be finding the first match, but nothing after that. Any idea why it can't seem to find more than one match when I run this?

Code:
alias -l makeIdentifiers {
  var %arg $remove($1-,$chr(36),$chr(37))
  var %regexIdentifierMatch ([A-Za-z]+\()
  var %matches $regex(Identifiers,%arg,%regexIdentifierMatch)
  echo -s Matches: $+ %matches
  var %a 1
  while (%a <= %matches) {
    var %match $regml(Identifiers,%a)
    echo -s Match: $+ %match
    if ($istok($identifierList,%match,44)) {
      var %arg $replace(%arg,%match,$chr(32) $+ $chr(36) $+ %match)
    }
    inc %a
  }
  return %arg
}

Originally Posted By: Status Window
Matches:1
Match:int(
Calculating $int(2.5) + abs(-3).
Matches:1
Match:abs(
Calculating $abs(-3) + int(2.5)

Last edited by KageNoOni; 29/05/10 09:02 AM.