RosettaCodeData/Task/Strip-block-comments/Lua/strip-block-comments.lua
2023-07-01 13:44:08 -04:00

8 lines
154 B
Lua

filename = "Text1.txt"
fp = io.open( filename, "r" )
str = fp:read( "*all" )
fp:close()
stripped = string.gsub( str, "/%*.-%*/", "" )
print( stripped )