• 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: Direct character replacement in a string
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Direct character replacement in a string


  • Subject: Re: Direct character replacement in a string
  • From: g3pb <email@hidden>
  • Date: Tue, 06 Feb 2001 16:04:02 -0900

> I get a string from a text file (using Akua) that could be something like
> this:
> "Th*s *s an ?xampl?"
> Where every "*" should be replaced by an "i" and every "?" by an "e" before
> doing something else in the script.
> There is no problem to do this when the * are separated with a delimiter ("
> " in this example) but when they are directly in a word ?


set aStr to "th?s ?s an *xample and th?s ?s anoth*r on*"
set aStr to munge aStr from "?" to "i" with repetition -- Akua text suite
set aStr to munge aStr from "*" to "e" with repetition

-- hcir
mailto:email@hidden
Made with a Mac!


References: 
 >Direct character replacement in a string (From: FlyMac <email@hidden>)

  • Prev by Date: Scripting Eudora
  • Next by Date: folders and sub-folders strikes again!
  • Previous by thread: Direct character replacement in a string
  • Next by thread: Re: Direct character replacement in a string
  • Index(es):
    • Date
    • Thread