• 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
Replacing characters in a string
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Replacing characters in a string


  • Subject: Replacing characters in a string
  • From: Matthew Fischer <email@hidden>
  • Date: Sat, 11 Nov 2000 17:07:24 -0500

How would I change this:

repeat with i from ((length of file_name) - 10) to length of file_name
if character i of file_name is not ":" then
set new_file_name to new_file_name & character i of file_name
end if
end repeat

To check for multiple characters, instead of just the colon? What I really want to do is make sure the character is not a colon, a space or an ampersand.

Thanks.


  • Follow-Ups:
    • Re: Replacing characters in a string
      • From: Allen Watson <email@hidden>
    • Re: Replacing characters in a string
      • From: "Serge Belleudy-d'Espinose" <email@hidden>
    • Re: Replacing characters in a string
      • From: "Christopher C. Stone" <email@hidden>
    • stack overflow avoidance?
      • From: Jeff Ganyard <email@hidden>
  • Prev by Date: Re: FTP basics
  • Next by Date: Re: FTP basics
  • Previous by thread: Re: Applescvript, Mac OS X, Terminal, PHP and MySQL question
  • Next by thread: stack overflow avoidance?
  • Index(es):
    • Date
    • Thread