This [\w\.]
is a character class (I removed the -
for now). Every character that is within the square brackets is matched by this class. So, your class is matching all letters, digits and underscores (that is done by the \w
part) and dots.
If you want additional characters, just add them to the character class, e.g. [\w.+&-]
.
Be careful with the -
character, it has a special meaning in a character class, either escape it or put it at the start or the end.
But be aware, your regex is still not matching all valid email addresses, see the links in the comments.
Single characters (without special meaning) or predefined classes written in a class doesn't make sense, [\w]
is exactly the same than \w
.