RegEx to prohibit some special characters -


what proper regular expression exclude or prohibit

< > * % : & \

i trying

^[^<>*%:&\\]$

but not seem work. please help, thanks.

it correct single characters. if want validate longer strings,

^[^<>*%:&\\]*$ 

if empty strings okay, or if not,

^[^<>*%:&\\]+$ 

Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -