Lua gsub - How to set max character limit in regex pattern
问题 From strings that are similar to this string: |cff00ccffkey:|r value I need to remove |cff00ccff and |r to get: key: value The problem is that |cff00ccff is a color code. I know it always starts with |c but the next 8 characters could be anything. So I need a gsub pattern to get the next 8 characters (alpha-numeric only) after |c . How can I do this in Lua? I have tried: local newString = string.gsub("|cff00ccffkey:|r value", "|c%w*", "") newString = string.gsub(newString, "|r", "") but that