String of strings

I have a string that contains multiple file names separated by a new line.

e.g.

“file1\nfile2\n”

I want to get each individual filename into a new string, what function would I use?

[import]uid: 31718 topic_id: 6657 reply_id: 306657[/import]

http://lua-users.org/wiki/SplitJoin [import]uid: 6645 topic_id: 6657 reply_id: 23203[/import]

Closely related to his answer, Lua provides the command gmatch() for what you want to do:
http://lua-users.org/wiki/StringLibraryTutorial

Here’s an explanation of the parameters to use with that command:
http://www.wowpedia.org/Pattern_matching

And here’s how to parse the words into a table:
http://developer.anscamobile.com/forum/2011/01/19/suggestions-how-parse-string-12-2312-144-1#comment-17295 [import]uid: 12108 topic_id: 6657 reply_id: 23249[/import]