Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 

WoWInterface » Developer Discussions » Lua/XML Help » Lua string parsing


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off