Code: Select all
item-_-ghost
item-0-_-driver
Code: Select all
item_name = string.match("item-_-ghost", "^(.+)%-_%-.+$")
log(tostring(item_name))
item_name = string.match("item-0-_-driver", "^(.+)%-[0-9]+%-_%-.+$")
log(tostring(item_name))
Code: Select all
item_name = string.match("item-_-ghost", "^(.+)(%-[0-9]+)*%-_%-.+$")
log(tostring(item_name))
item_name = string.match("item-0-_-driver", "^(.+)(%-[0-9]+)*%-_%-.+$")
log(tostring(item_name))