Hi

I'm processing a large number of lines from a text file that are 
padded at the end of each line with a tab followed by a variable 
number of 'x', e.g.

        data(tab)xxxxxxxxxx
        data2(tab)xxxxx
        data3(tab)xxxxxx

Whilst I can use a repeat loop to cycle through deleting the last 
item (using tab as the itemDelimiter), this is very slow.  If there 
were a fixed number of 'x' at the end then I'd simply use a replace 
command, e.g.

        replace tab & "xxx" with "" in readBuffer

I thought about using the replaceText function which support regular 
expressions, but I can't see how I can show the tab and end-of-line 
(EOL) in the regex?  I would have tried:

        put replaceText(readBuffer, "\txx*\n", "\n") into newBuffer

Any ideas how I might do this or perhaps another approach completely?

Cheers
Peter
--------------------------------------------------------
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Reply via email to