Ken and Chipp are  being very helpful when they provide useful/working code, 
but I'm more curious about why the original code did not work.  It looked 
reasonable to me: the kind of code I might actually use some day, and get stuck 
on.

Any thoughts?

:)

Jon




On 8/9/05 8:17 PM, "Sivakatirswami" <[EMAIL PROTECTED]> wrote:


I'm missing something very simple here,

Goal: delete empty lines beginning and end of text chunk

Chipp Walters wrote:


> Katir,
>
> If you wanted to do it in a repeat loop:
>
> repeat with x = the number of lines in tFinalTranscript down to 1
> if line x of tFinalTranscript is "" then delete line x of tFinalTranscript
> end repeat


Ken Ray wrote:

Try this:

function trim pWhat
 local tRetVal
 get matchText(pWhat, "(?s)^\s*(.*?)\s*$", tRetVal)
 return tRetVal
end trim


Trims all forms of whitespace (CRs, spaces, tabs, etc.) from the beginning
and end of a text chunk.

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to