View Single Post
11-08-05, 10:36 AM   #1
Ego
A Deviate Faerie Dragon
 
Ego's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2005
Posts: 15
Lua string parsing

I'm looking for a bit of help with parsing a string in Lua.

The pattern I've got is 4 numeric values separated by commas.
Something that look like "1, 2, 3, 4"

I want to split out each value into 4 separate local variables,
for example a, b, c, d.

It would be nice if the spaces between them were optional,
and something that could handle if less than 4 values are
present.

I haven't learned enough on parsing strings in Lua, so if
anyone can provide some help, I'd appreciate it.
  Reply With Quote