• 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: Simple text question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Simple text question


  • Subject: Re: Simple text question
  • From: Michelle Steiner <email@hidden>
  • Date: Mon, 7 Jul 2008 10:15:10 -0700

On Jul 7, 2008, at 10:03 AM, Script2 wrote:

I want to test which word contains [F].


The problem is that Applescript doesn't consider non alpha-numerics as part of words.

So no word contains "[F]"

This might solve your problem:

set a to "6000[F]this is test (#1)."
set text item delimiters to space
set a to text items of a
repeat with b in a
	if b contains "[f]" then
		set found to contents of b
		exit repeat
	end if
end repeat
found

--> "6000[F]this"

-- Michelle

--
"Every gun that is made, every warship launched, every rocket fired, signifies in the final sense a theft from those who hunger and are not fed, those who are cold and are not clothed."
President Dwight D. Eisenhower, April 16, 1953


_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • RE: Simple text question
      • From: "Script2" <email@hidden>
References: 
 >Simple text question (From: "Script2" <email@hidden>)

  • Prev by Date: Simple text question
  • Next by Date: Re: Simple text question
  • Previous by thread: Simple text question
  • Next by thread: RE: Simple text question
  • Index(es):
    • Date
    • Thread