Given is the string:
local a = "#5*$4a+02/+2-%110"
Now i want to split the following string into a table like
b[1]="5"
b[2]="*"
b[3]="$4a"
b[4]="+"
...
b[10]="%110"
My solution was
local b = {}
for part in string.gmatch(a,"[%x%$%%]+[%+%-%/%*]+") do
b[#b+1] = part
end
But i get
b[1]="5*"
b[2]="$4a+"
b[3]="02/"
...
but without the last number: %110.