• 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: zeroing in on a string inside quotes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: zeroing in on a string inside quotes


  • Subject: Re: zeroing in on a string inside quotes
  • From: Mark Butcher <email@hidden>
  • Date: Thu, 29 Nov 2001 09:39:40 -0800

If I wan't to zero in on the word inside the quotes, after the "value=", and
put it in a variable

If the format of the string is consistent, and you just want the last word, try

set theText to "input type=hidden id=\"UserId\" name=\"UserId\" value=\"swordfish\
""
last word of theText --> "swordfish"

If you also want the other 2 values, note that

words of theText as list
--> {"input", "type", "=", "hidden", "id", "=", "UserId", "name", "=", "UserId", "value", "=", "swordfish"}
count of words of theText --> 13

and words 7 and 10 give the other values:

word 7 of theText --> "UserId"
word 10 of theText --> "UserId"

Best

MarkB


References: 
 >zeroing in on a string inside quotes (From: email@hidden)

  • Prev by Date: Re: Conflict with Standard Additions 1.7f2 (classic) and Smile (1.8.4, at least)
  • Next by Date: Re: Run Script upon Waking?
  • Previous by thread: Re: zeroing in on a string inside quotes
  • Next by thread: Re: zeroing in on a string inside quotes
  • Index(es):
    • Date
    • Thread