lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


HI,

possibly reading page 215 in PiL3 could help you...the trick is to use gsub() three times:

match = match:gsub("(%W)", "%%%1")
replace = replace:gsub( "%%", "%%%%")
changed = original:gsub( match, replace)

--
Oliver

Alternatively, I'm also happy for easier solutions to get this
behavior of gsub if this is already possible in an easier way that I
haven't seen.

Regards,
Jonas Thiem