Removing CRLF from text

Joe Lewis Wilkins pepetoo at cox.net
Wed Aug 6 23:50:10 EDT 2008


Hi Mark,

If I follwed this thread  even partially, I believe you're just trying  
to get rid of empty lines. Correct?
So why not rebuild the whole thing by examining each line; if it is  
empty, skip it; otherwise add it to a new var on its next line.
Once you've done the whole lot, replace the text with this new var.

I've probably missed the whole issue, but????

Joe Wilkins

On Aug 6, 2008, at 8:35 PM, mfstuart wrote:

>
> Hi Jacqueline,
> Refer to my replay to Sarah - no go.
>
> So any other suggestions are welcome.
>
> Regards,
> Mark Stuart
>
>
>
> J. Landman Gay wrote:
>>
>> mfstuart wrote:
>>
>>> I've used this script, and variations of it, to remove these  
>>> characters:
>>> +
>>> CRLF.
>>> It removes the + char, but still leaves each ini entry split into
>>> multiple
>>> lines.
>>
>> <snip>
>>
>>>  repeat for each line L in tData
>>
>> When a script gets a line of text, the engine omits the end of line
>> character(s) and returns only the text of the line itself. That is  
>> why
>> the lines stay separated, since the line delimiters are left  
>> intact. (It
>> works just like items; when you get an item from a string, the  
>> comma is
>> not included.) Instead of working on each line, work on the entire  
>> block
>> of text as a whole. You should be able to do it like this:
>>
>> put URL ("file:" & tFilename) into tData
>> put "+"&CR&LF into tChars
>> replace tChars with space in tData
>>
>> -- 
>> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
>> HyperActive Software           |     http://www.hyperactivesw.com
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/Removing-CRLF-from-text-tp18862004p18863449.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

Joe Lewis Wilkins
pepetoo at cox.net






More information about the use-livecode mailing list