<pre>function stripNonDials N  repeat with P = the length of N down to 1    if char P of N is not in "0123456789,*#" then delete char P of N  end repeat  return Nend stripNonDials</pre>