Re: "starts with" any list item
Re: "starts with" any list item
- Subject: Re: "starts with" any list item
- From: Christopher Stone <email@hidden>
- Date: Tue, 30 Sep 2003 06:25:14 -0500
At 08:34 -0600 09/29/2003, Gnarlodious wrought:
I'm looking for a shortcut.
I need to loop through this list:
set nullTitles to {"ASCII", "Index of ", "http"}
______________________________________________________________________
This can be done easily with the Satimage osax and regular expressions:
-- =======================================================================
-->> Find using Satimage osax - returns boolean AND result
-- =======================================================================
on fnd(findStr, usingStr, theText, regexFlags, stringResultFlag, allOcFlag)
try
find text findStr in theText using usingStr regexpflag regexFlags
string result stringResultFlag all occurrences allOcFlag with regexp
return true
on error
return false
end try
end fnd
set nullTitles to "ASCII|Index of |http"
set clippingTitle to "
http://www.macin..."
if fnd("^(" & nullTitles & ")", "\\1", clippingTitle, {"EXTENDED",
"NEWLINE", "ICASE"}, true, false) of me then
-- DO YOUR THING
end if
Chris
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.