replace a substring in a string lua code example Example: replace part of string lua name = "^aH^ai" name = name:gsub("%^a", "")