currently i only allow can let the field do not allow special character by using this regex : ^[a-zA-Z0-9_ ]*$
If i just want dont let user to pass for first and last character, what should i put on regex?
sample like :
.Apple = fail
Appplepie. = fail
Apple.Pie = pass
答案 0 :(得分:3)
The following regex should work:
^[a-zA-Z][a-zA-Z0-9._]*[a-zA-Z]$