Not shy at all...
alex at tweedly.net
Sun Jun 6 17:00:28 CDT 2004
At 13:45 06/06/2004 -0700, Jeanne A. E. DeVoto wrote:
>At 9:55 AM -0700 6/6/2004, Bob Nelson wrote:
>>Two fields and two buttons so I can work through the example - the first
>>field is the 'holder' of the remote URL which has been retrieved
>>(Imported_Raw) and the second field will be the restructured output when I'm
>>Here's the code, for those who want to dive deeper...
>Using replace (instead of looping through each line) will be quite a lot
> put field "Imported_Raw" into rawText -- manipulations are much faster
> in variables
> repeat while return & return is in rawText
> replace return & return with return in rawText -- nuke blank lines
> end repeat
> repeat while return & space is in rawText
> replace return & space with return in rawText -- nuke leading space
> end repeat
> put rawText into field "Imported_Raw"
Since I brought up Regular Expressions, I have to suggest:
put field "Imported_Raw" into rawText
put replaceText(rawText, "\n+ *", cr) into field "Imported_Raw"
Should be even faster than two replace loops
But the HTMLText technique looks much better :-)
-- Alex Tweedly.
btw - thanks Jeanne - I had done the search - but inside Transcript
Dictionary, instead of in the whole doc. set - my mistake.
-------------- next part --------------
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.699 / Virus Database: 456 - Release Date: 04/06/2004
More information about the use-livecode