Re: reading large text file
Re: reading large text file
- Subject: Re: reading large text file
- From: Emmanuel <email@hidden>
- Date: Mon, 20 Aug 2001 20:27:15 +0200
At 18:41 +0200 20/08/01, email@hidden wrote:
>
How can I read just one line of the file at a time into a variable and then
>
search for the string, stopping if I get a match and extracting the numbers
>
on that line? If anyone has a better method for dealing with this, that would
>
be appreciated too.
That's a one-(long)liner for Smile.
------------------------- tested
set {the_R, the_G, theB} to matchResult of (find text "([0-9]+) ([0-9]+)
([0-9]+) PANTONE 185 CVC" in (open theFile) with +class UsGR; given +class
by ;:{"\\1", "\\2", "\\3"})
-- {"255", "42", "48"}
-------------------------
(theFile being your file)
HTH
Emmanuel
PS
Here is the line of code as hexa for the list - only Ken has it all right.
736574207B7468655F522C207468655F472C20746865427D20746F206D61746368526573756C7420
6F66202866696E6420746578742022285B302D395D2B2920285B302D395D2B2920285B302D395D2B
292050414E544F4E4520313835204356432220696E20286F70656E2074686546696C652920776974
6820C7636C6173732055734752C820676976656E20C7636C6173732062792020C83A7B225C5C3122
2C20225C5C32222C20225C5C33227D290D