• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: "starts with" any list item
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >"starts with" any list item (From: Gnarlodious <email@hidden>)

  • Prev by Date: Re: "starts with" any list item
  • Next by Date: Re: Writing To A File
  • Previous by thread: Re: "starts with" any list item
  • Next by thread: Re: "starts with" any list item
  • Index(es):
    • Date
    • Thread