string.gsub() and regular expression - WoWInterface
Thread Tools Display Modes
Prev Previous Post   Next Post Next
01-24-21, 03:44 PM   #1
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Dec 2010
Posts: 36
string.gsub() and regular expression

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

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

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » string.gsub() and regular expression

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off