-- your code goes herex = "W-9007-mnist_1.0.0.ms"x = x:gsub("(.*)[%p]", "%1_")print(x)
Standard input is empty
W-9007-mnist_1.0.0_ms
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!