Jump to content

problem with string.gsub


KillerX

Recommended Posts

patterns = {"%p", ","}
for i,v in ipairs(patterns) do
    str = string.gsub(str, v, "")
end
23 minutes ago, KillerX said:

Hi ,

now i have this string


msg = "@#!%%^,:{}"

and i can remove all signs from this string by this way


string.gsub( msg , '%p' , '' )

tha question is : how to remove all signs from this string except this sign " , "

Thanks

https://stackoverflow.com/questions/25280374/lua-string-gsub-with-multiple-patterns

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...