Now we have more info, it's pretty clear that this is your homework, and the Regex you show has nothing to do with the problem as stated.
Read the assignment carefully.
1) The maximum length of the username is 30 characters. So start with that and come up with a basic regex that accepts any character but will not match 31+.
That's easy - so easy I'll give it to you:
^.{1,30}$
2) Only the following are allowed: letters, numbers, periods, underscores.
That's also easy: there is a "specified set" you can use in a regex to limit it to "just these":
[+-!]
will match only a single plus, minus, or exclamation mark.
If you have a look at "design mode" in Expresso, it'll show you how to use it and some of the special characters it can contain.
But I'm not doing it for you! While we are more than willing to help those that are stuck, that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for us to do it all for you.
So we need you to do the work, and we will help you when you get stuck. That doesn't mean we will give you a step by step solution you can hand in!
Hint: my version of the correct regex was 14 characters long ... yours may be longer!