In Lua, how would one match 123, against a string that is 11122333, and find the 1 and 2 and 3? is there a pattern that can do this? rather than attaching individual character checks?
local str = '11122333'
str = str:gsub('.','\0%0%0'):gsub('(.)%z%1',''):gsub('%z.','')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With