>Another solution is like this: > > line = ' '..line..' ' > line = gsub(line, '(%W)'..s..'(%W)', '%1'..sh..'%2') -- in the middle > line = strsub(line, 2, -2) Thanks... now I feel like a complete idiot :-) Enrico