on fnd(findStr, dataSrc, caseSensitive, allOccurrences, stringResult)
find text findStr in dataSrc ¬
case sensitive caseSensitive ¬
all occurrences allOccurrences ¬
string result stringResult ¬
with regexp
end fnd
set dataSrc to "Now is the time for all •good• men to come to the aid of their country."
try
set foundRecord to fnd("•", dataSrc, false, true, false)
on error errMsg number errNum
beep
tell me to display dialog "Error: " & errMsg & return & "Error Number: " & errNum
end try
--> Result:
(*
{
{
matchPos:24,
matchLen:1,
matchResult:"•"
},
{
matchPos:29,
matchLen:1,
matchResult:"•"
}
}
*)