Seperate numbers from text

Jeanne A. E. DeVoto revolution at jaedworks.com
Wed Apr 6 02:46:41 EDT 2005


At 12:55 PM +1000 4/6/05, Dwayne Rothe wrote:
>Is there a way to seperate numbers from text in a string?
>e.g "string69" to return 69 or "string69also" to return 69
>
>Is it possible to filter somehow?


Here's one way:

   repeat for each char thisChar in myString
     if thisChar is a number then put thisChar after numbersOnlyString
   end repeat

-- 
jeanne a. e. devoto ~ revolution at jaedworks.com
http://www.jaedworks.com


More information about the use-livecode mailing list