• 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: offset with spaces confusion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: offset with spaces confusion


  • Subject: Re: offset with spaces confusion
  • From: Christopher Nebel <email@hidden>
  • Date: Fri, 3 May 2002 09:03:49 -0700

On Friday, May 3, 2002, at 08:36 AM, email@hidden wrote:

If the word "New" appears in the description, then I have to change the colour of it. Simple, but some of the product styles include "Newark", "Newport" and "Newton" to name a few. Which all contain "New" and produce the wrong effect. Because the word "New" can appear anywhere, I can't look for "<space>new<space>".

In that case, try this:

words of some_string contains "new"

words of "Newark" contains "new" --> false
words of "New Ark" contains "new" --> true

Added bonus: works with considering/ignoring case! Added slam: won't work with strings bigger than 32K.


--Chris Nebel
AppleScript Engineering
_______________________________________________
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.

  • Prev by Date: Re: Finder Whose by Modification date
  • Next by Date: Re: EXCEL SCRIPTING
  • Previous by thread: Re: offset with spaces confusion
  • Next by thread: Re: offset with spaces confusion
  • Index(es):
    • Date
    • Thread