Allowing digits and dots in gsub

Hey developers!

I have a little question. How can I allow digits and dots in my gsub line.
Here is my line:

list.BubbleDuration.UserInput.Text = string.gsub(list.BubbleDuration.UserInput.Text, "%D+", "")

Edit after 3 minutes:
What I’m trying to say is: how can I possibly describe a character type and just a character.

Have a nice day, iamajust.

Use a set instead so you can whitelist/blacklist certain characters. Remember that . is a magic character in string patterns, so to cancel out its characteristic you must escape it with a percent sign % before the period. So that means the pattern you get is "[^%d%.]+"

The ^ means to match anything that is not a digit or a period.

Thanks for your help! I appreciate it.