IF and... multiple OR | (=*.*=) A newbie nightmare
Posted: Wed May 29, 2013 11:47 am
Hello to all!
I am continuing to study LiveCode... it's fantastic!!!!!
But now I'm stopped on this IF statement... (=*.*=)
Here's the problem in "PigCode" (I'm a guru of PigCode!!!!
)
I have a list of words into field fList:
cat,
cat
,cat
!cat
cat!
cat$
cat%
If any of these words contain at the end "," or "!" or "$" doSomething
I've tried so:
This in fact works!
BUT.... 
This does not work! 
So I thought this
But it does not work ...
Help me to solve this newbie nightmare for a newbie !
Thanks!!!
Baci!!!!!
Mariasole
(=°.°=)
I am continuing to study LiveCode... it's fantastic!!!!!
But now I'm stopped on this IF statement... (=*.*=)
Here's the problem in "PigCode" (I'm a guru of PigCode!!!!

I have a list of words into field fList:
cat,
cat
,cat
!cat
cat!
cat$
cat%
If any of these words contain at the end "," or "!" or "$" doSomething
I've tried so:
Code: Select all
repeat for each word tWord in field "fList"
IF (",") or ("!") is the last char of tWord THEN answer last char of tWord
end repeat


Code: Select all
repeat for each word tWord in field "fList"
IF (",") or ("!") or ("$") is the last char of tWord THEN answer last char of tWord
end repeat

So I thought this

Code: Select all
repeat for each word tWord in field "fList"
IF "(?:[,!$])" is the last char of tWord THEN answer last char of tWord
end repeat
Help me to solve this newbie nightmare for a newbie !

Thanks!!!
Baci!!!!!
Mariasole
(=°.°=)