I am not very familiar with regex.
I am trying to implement some restrictions on input. I want to allow all numbers and characters, with special characters like ~"$#*@
etc. except these 4: & ' % _
.
I tried like:
/[a-zA-Z0-9-!@#$^*)(+=.-~"]/
But it is not restricting the _
underscore. How can I restrict underscore, and is there any best way to allow all except 4 without writing all symbols in regex?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…