How do I get the word before char x?
sarah.reichelt at gmail.com
Sun Jun 29 23:36:21 CDT 2008
On Mon, Jun 30, 2008 at 2:09 PM, Bill Vlahos <bvlahos at mac.com> wrote:
> 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
> 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.).
put the number of words in char 1 to x of fld "Data" into tWordNum
put word tWordNum - 1 into tPrevWord
More information about the use-livecode