How to invalidate when there is whitespace between a string using regex?

后端 未结 0 827
夕颜
夕颜 2021-01-12 10:12

My current regex is /^[a-zA-Z\\s-]*$/

This allows whitespace at the extreme ends of the string which is fine for ex-: hello or hell

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