How do I get the word before char x?

Bill Vlahos bvlahos at mac.com
Mon Jun 30 00:09:20 EDT 2008


How do I get the word before a specific character in a field? I can be  
any character in the text field I choose but I can't figure out how to  
do something like "get the previous word" from a specific character in  
the field.

The only way I figure I could do it would be to crawl backwards via a  
repeat loop until I get to a space. This seems inelegant and I can  
envision several situations which would trip this up (punctuation  
characters, etc.).

Is there a built in function for this?

Thanks,
Bill Vlahos



More information about the use-livecode mailing list