I have regular expression which is checking for at least one character or number:
^(?=.*[a-zA-Z])(?=.*[0-9]).*$
I want to add one more condition there to exclude forward slash:
I know that to exclude forward slash would be something like that [^/] but i don’t know how exactly put it to my regex.
May be someone may help me with that?
That’s all there is to it.
The dot
.means “any character”. The*repeats the previous token 0 or more times. Someans “zero or more non-slash characters”, whereas
means “one non-slash character, followed by zero or more characters of any kind”.