Regular expression to allow the special character at the start and end but hyphen(-) to be accepted in between the word not at the start and the end

后端 未结 0 1559
一向
一向 2020-12-09 18:33

I have one regex expression

var pattern = /^[,.\']|[-!$%^&*()_+|~=`\\\\#@{}\\[\\]:";<>?\\/]/;

which doesn\'t allow any special

相关标签:
回答
  • 消灭零回复
提交回复
热议问题