Re: Direct character replacement in a string
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!