How do I add muiltiple string patterns to one string.match?

Here’s the specific code of line:

if (string.match(Domain, “%w+”) == Domain) then

Now how would I match 3 specific symbols aswell? Only dot (.), dash (-) & underscore (_)?

Something like this: ("%w+").-_
Just that that wouldn’t work, so how would I format it?

Because there are only three symbols, thus seven different combinations, you could use an or statement and just copy the original statement, adjusting it. That’s just the basic way tho.

Else you could split the string three ways, then check each one to see if each of the three symbols are present, but you would want to be aware of repeats and whatnot (if possible when making the symbols string)

A:

You can use ^[-._a-zA-Z0-9]+$ for this.
This will match any combination of letter, number, dot, dash and underscore, as long as it starts and ends with one of them.
Note that using %w in Lua is not the same as ^\w in regex.

A:

You can use %a for alphabets, %d for digits, %l for lowercase, %u for uppercase, %p for punctuations, %w for alphabets and digits, %s for whitespaces and %c for control characters.
With this, you can use %w, %p and %s.
if (string.match(Domain, “[%w%-_%s]*”) == Domain) then

Well just because it matches it won’t remove all the letters that are not in there.

No you did not do it correctly try again please.