I am a novice learning Lua, i like to use Codea which is a ipad editor that scripts with Lua, its quite a pretty editor built on Objective C if I remember right :P
Anyway, anyone else here using Lua for whatever purpose? I don't really do anything with it, just kills time by practicing my programming now and then.
Right now i'm trying to learn Patterns for use in string.gsub. I haven't got the hang of it yet.
Heres one example of fixing broken formatting. Its the stuff inside the brackets tha needs to be removed, but inbetween the beackets the example sould stay. (not the double brackets, those are used to specify a string)
So i thiught this would work, it doesn't, i think that brackets are used to mean something in Lua already.
USA
katsup or mustard
Anyway, anyone else here using Lua for whatever purpose? I don't really do anything with it, just kills time by practicing my programming now and then.
Right now i'm trying to learn Patterns for use in string.gsub. I haven't got the hang of it yet.
Heres one example of fixing broken formatting. Its the stuff inside the brackets tha needs to be removed, but inbetween the beackets the example sould stay. (not the double brackets, those are used to specify a string)
--remove every character between brackets
str = [[ [ FONT="] This is an example that doesn't work![ /FONT] ] ]
str = string.gsub(str, "[(.-)] ", "")
So i thiught this would work, it doesn't, i think that brackets are used to mean something in Lua already.
USA
katsup or mustard
[This message has been edited by local boi (edited 01-15-2017 @ 02:02 PM).]