Anyway, it's obvious where this is going, you want to detect the percentage of caps in a sentence probably.

/*

Usage: $caps(string)[.property]

If no property is specified, it returns the number of caps in the string, else it returns the percentage of caps.

Available properties:

alpha: compares to all alpha characters
nonspace: compares to all non-space chars (tab is not a space)
all: compares to all chars

Examples:

//echo -a $caps(ab CD12*)
//echo -a $caps(ab CD12*).alpha
//echo -a $caps(ab CD12*).nonspace
//echo -a $caps(ab CD12*).all

*/

Code:
alias caps {
  var %caps = $regex($$1,/[A-Z]/g), %type = alpha nonspace all
  if (!$prop) return %caps
  if (!$istok(%type,$prop,32)) return Bad property
  return $calc(100*%caps /$regex($1,/ $gettok([a-z];[^ ];.,$findtok(%type,$prop,1,32),59) /gisx)))
}


Gone.