I have just started learning JS. In the regular expressions topic, as one of my assignments, this was the problem statement.
The string can have the following characters-
Uppercase (A-Z) and lowercase (a-z) English letters.
Digits (0-9).
Characters ! # $ % & ' * + - / = ? ^ _ ` { | } ~
Character . dot provided that it is not the first or last character and it will not come one after the other.
I tried many different ways and the best I could do was - /^[^.]([\^><@,.]+)/
It is clearly wrong. The main issue for me is ensuring that the .(dot) does not come in the beginning or the end and it does not repeat. There are other issues as well.
can someone give me a help with it?