Re: Parsing a text file
Re: Parsing a text file
- Subject: Re: Parsing a text file
- From: Emmanuel <email@hidden>
- Date: Wed, 22 Aug 2001 01:26:13 +0200
At 1:00 +0200 22/08/01, Matthew Fischer wrote:
>
What's the best way to retrive the text that is in between (and not
>
including) the three pairs of tags?
You can "read" only "until" one character, not a string. I suppose your
"read" would stop at each "<".
If you do not want to use third-party Scripting Additions then
read the file line after line using the Standard Scripting Addns
use AppleScript's text item delimiters to split the line
else if you do not want to use a third-party application then
read the file like above or using a third-party Scripting Addn
use Regular Expressions to split the line
-- RegExp and Satimage are two Scripting Addns which provide R.E.
else
open the file in Smile
use Regular Expressions in Smile
end if
HTH
Emmanuel