I am having a hard time to understand string patterns for string.match().
At the moment I need to get from string “/folderone/foldertwo/folderthree/” the last folder name.
this is my progress so far:
[lua]
local text = “/folderone/foldertwo/folderthree/”
print(string.match( text, “[a-z]-.$” )) – prints folderthree/
[/lua]
all i now need to get that character ’ / ’ away somehow with pattern…
Oh and mabye if there is a way to get numbers work in text that would be nice too 
EDIT: I can’t find any good documentation for string patterns. If someone know a good one I would be much appreciated 
EDIT: After an hour of struggling with this problem and in 20 min after posting I got it working nicely :rolleyes: . My resolve if someone ever is also struggling with this (or someone thinks this is a horrible way to do this):
[lua]
text:match( “([%a+0-9]-).$” )
[/lua]
Some good links for string patterns still requested though…