lua-users home
lua-l archive

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


Hi,
I'm having a little trouble figuring out how patterns and gsub work. I followed the example in the documentation to break a string up into a table of words, but I need to do two things: first, just take the first (space-delimited) word off the beginning of the string (this is for splitting it up into command and argument strings). I also need to have anything between a pair of ' be read as one word, for example the string "first 'this is one word' third" would be split up into {"first", "this is one word", "third"}. Can anyone tell me how to do this?
Thanks

=^_^=
----------------------
Do you do Linux? :) 
Get your FREE @linuxstart.com email address at: http://www.linuxstart.com