There are some mistakes in your pattern.
The
-
minus sign defines a range within a bracketed character class. So it has to be escaped or the first character if you want to match the character. When using
+-\/
by intention then it matches all characters from 0x2b to 0x2f (which includes the dot which can then be removed).
The
s
at the end is useless.
[EDIT]
To allow white spaces it must be
\s
.
[/EDIT]
To check for valid lengths you have to match the whole string using
^
and
$
.
You have not specified which language you are using. Here is a working Perl regex:
if ($test =~ /^[A-Za-z0-9_@.
print "match";
}
else {
print "no match";
}