• 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(2): Re(2): Re(2): Counting Words and Characters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re(2): Re(2): Re(2): Counting Words and Characters


  • Subject: Re(2): Re(2): Re(2): Counting Words and Characters
  • From: "Arthur Cormack" <email@hidden>
  • Date: Fri, 13 Jul 2001 16:22:28 -0400

Sweet!!! This works.
Thank you so much.
-Arthur

email@hidden writes:
>>Thank you Michele. This too will work, even if you don't know what
>>word number 5 is.
>>(... it's pretty obvious actually)
>>... but if the pattern was not unique in the line being analysed -
>>say, if word 5 also occurred earlier, or later on in the line ... it
>>could cause some trouble, no? if word 1 was the same as word 5, for
>>example, and we looked for the offset, we snip in the wrong place.
>>Am I being too stubborn?
>
>So, the problem is that you want to replace word five, regardless of
>what
>it is, and do not want to replace any other instances of that word?
>That's even easier, and I should have done that in the second
>iteration,
>had I thought about it a bit longer.
>
>set stringtochange to "The quick brown fox jumped over the dirty
>black
>dog's head."
>set {tid, text item delimiters} to {text item delimiters, space}
>set listtochange to text items of stringtochange
>set item 5 of listtochange to "leaped"
>set newstring to listtochange as text
>set text item delimiters to tid
>newstring
>
>--Michelle


References: 
 >Re: Re(2): Re(2): Counting Words and Characters (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: Re(2): Re(2): Counting Words and Characters
  • Next by Date: Re: Counting Words and Characters
  • Previous by thread: Re: Re(2): Re(2): Counting Words and Characters
  • Next by thread: FM insert Picture
  • Index(es):
    • Date
    • Thread