View Single Post
01-24-21, 03:44 PM   #1
Platine
A Cliff Giant
AddOn Author - Click to view addons
Join Date: Dec 2010
Posts: 72
string.gsub() and regular expression

I need to get text without a comma in numbers using string.gsub() function:

Code:
local text = "The number 45,678 is big, but 1,234 is small."
text = string.gsub(text, "[0-9],[0-9]", "???")
print (text)
-- should be: "The number 45678 is big, but 1234 is small."
What should be the third parameter in the string.gsub() function ?
  Reply With Quote