These tests, with or without the “considering punctuation … end considering” block and with or without “as Unicode text”, always fails, and yet each of them compiles. [AS version 1.10.7; OS X 10.4.10; PowerMac G5.]
considering punctuation
set T to {"this is a (line", "mercy, me", "hello!", "yes.", "minus-", "No Punct"}
set P to {}
repeat with I in T
if ((contents of I) as Unicode text) contains punctuation then set P's end to true
end repeat
set L1 to ("this is a (line) mercy me hello! yes. minus- No Punct" as Unicode text) contains punctuation
set L2 to ("Hello there, my name is Adam." as Unicode text) contains punctuation
set L3 to "," contains punctuation
set L4 to ("," as Unicode text) contains punctuation
end considering
---> all false.
and yet I swear I’ve got “true” somewhere else.