Фантастика - тоже забыл окно просмотра! Fot all: просто добавьте
<meta name="viewport" content="width=device-width,initial-scale=1.0">
в свою голову
Попробуйте поэкспериментировать с чем-нибудь вроде http://www.weitz.de/regex-coach / , который позволяет разрабатывать регулярное выражение в интерактивном режиме.
Он разработан для Perl, но помог мне понять, как регулярное выражение работает на практике.
@"^\w+$"
\w matches any "word character", defined as digits, letters, and underscores. It's Unicode-aware so it'll match letters with umlauts and such (better than trying to roll your own character class like [A-Za-z0-9_] which would only match English letters).
The ^ at the beginning means "match the beginning of the string here", and the $ at the end means "match the end of the string here". Without those, e.g. if you just had @"\w+", then "@@Foo@@" would match, because it contains one or more word characters. With the ^ and $, then "@@Foo@@" would not match (which sounds like what you're looking for), because you don't have beginning-of-string followed by one-or-more-word-characters followed by end-of-string.