Jump to content

string.fin/gsub


#Paper

Recommended Posts

try
if string.find(g_MapInfo.name, "[DM]", 1, true) then -- disable pattern matching on [ ] 
   g_MapInfo.name = string.gsub(g_MapInfo.name, '%[DM%]', '#ff0000[DM]#236B8E') -- escape [ ] with %[ %] 
end 

omfg it works D:

Btw what changes if i use the %?? D:

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...