lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Thanks you all for your detailed explanation :)

So I choose :
    l:match("^%s*(.-)%s+(%d+).-(%d+)")

Petite Abeille > Aren’t your strings fix length?
Yes ... but as my data source come from my ISP, I'm not sure I can rely on that. I mean, it may be trashed with next firmware update.

Thanks again.

---
The misspelling master is on the Web.
  _________ 100 % Dictionnary Free !
/               /(
/ Dico       / / Pleins d'autres fautes sur
/________/ /
(#######( / http://destroyedlolo.info
Quoi, des fautes d'orthographe! Pas possible ;-D.


On Saturday, November 16, 2013 8:38 PM, Petite Abeille <petite.abeille@gmail.com> wrote:

On Nov 16, 2013, at 7:42 PM, Laurent FAILLIE <l_faillie@yahoo.com> wrote:

> 2/ If I want to generalize, I got a set of strings link


Aren’t your strings fix length?

E.g.:

aLabel = aLine:sub( 1, 23 )
aFirstValue = aLine:sub( 24, 42 )
aSecondValue = aLine:sub( 43 )