lua-users home
lua-l archive

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


Hi,

First of all, thanks for the suggestions about my
previous query about csv parsing with embedded '\n'.

I took the idea from both answers and get a nice
parser using lpeg which use only 2x time(over python's
C module) in parsing the ip by country CSV(4M or so)
by processing ~8K chunk.

lpeg really rocks and I want to use it more but have a
few questions:

What would be the equivalent of pattern{x,y} in regex,
i.e. pattern can occur between x and y times ?

Is it possible to parse length encoded pattern like
bencode used in bittorrent where a string is :

length:<bytes repeated 'length' times>




      ____________________________________________________________________________________
Shape Yahoo! in your own image.  Join our Network Research Panel today!   http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7