This makes no sense to me, see examples below.
--script
on fnd(findStr, dataSource, caseSensitive, allOccurrences, stringResult)
try
set findResult to find text findStr in dataSource ¬
case sensitive caseSensitive ¬
all occurrences allOccurrences ¬
string result stringResult ¬
with regexp
return findResult
on error
return false
end try
end fnd
------------------------------------------------------------------------------------------------
set stringCount to 0
-- set str to "Broadband2Go - 3G Mobile Broadband Service | Virgin Mobile"
set str to "Your Broadband2Go Account Number and Programming Instructions"
-- set foundString to fnd("[A-Z0-9space]+", str, true, true, true) --> 15 - should be 18
-- set foundString to fnd("[A-Z]+", str, true, true, true) --> 7 - OK
-- set foundString to fnd("[A-Z0-9]+", str, true, true, true) --> 7 - should be 9
-- set foundString to fnd("[[A-Z],[0-9]]+", str, true, true, true) --> 7 - should be 9
set foundString to fnd("[NA ]+", str, true, true, true) --> 6 - should be 18
set stringCount to length of foundString
Robert Poland - Fort Collins, CO