Lua splitting a string without separators
snippet in lua

Lua splitting a string without separators

user492

x = "M34a79 or M2ab943 or M4c4"

x, _ = x:gsub( "(%d)(%a)", "%1,%2" )
x, _ = x:gsub( "(%a)(%d)", "%1,%2" )

print( x )