Re: zeroing in on a string inside quotes
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