To validate only word simplest regex would be (I think)
/^w+$/
I want to exclude digits and _
from this (as it accept aa10aa
and aa_aa now, I want to reject them)
I think it can be gained by
/^[a-zA-z]+$/
which means I have to take a different approach other than the previous one.
but what if I want to exclude any character from this range
suppose I will not allow k
,K
,p
,P
or more.
Is there a way to add an excluding list in the range without changing the range.?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…