itemDelimiter
Brian Yennie
briany at qldlearning.com
Thu Feb 12 08:14:11 EST 2004
You've got a couple options (at least):
1) Use regex, see matchText and match on something like
"<text>(.*)</text>"
2) Use offset(), as you imagined, something like:
put "<title>" into startTag
put offset(startTag, theHTML) into startOffset
if (startOffset > 0) then
put offset(endTag, theHTML, startOffset + length(startTag) - 1) into
endOffset
if (endOffset > 0) then
put char startOffset to (startOffset + endOffset - 1) of theHTML
into theTitle
end if
end if
HTH
- Brian
> I was wondering if the itemDelimiter can be more than one character? I
> mean instead of "," or ":" can it be "<!--display paragraphs-->" ?
> If the answer is NO then can someone help me understand how to sift
> through the html below to just extract the title text and the 2
> paragraph texts? I know I can offset("<title>") field "HTML" but then
> what can I do to extract the text after that?
> It may be obvious but for the life of me I can't 'see' it.
More information about the use-livecode
mailing list