[英]How to generate Regular Expression that doesn't contain any white space at all and even at the beginning or the end of the string
You can use 您可以使用
^\S*\S+\S*$
It will detect whitespace between string. 它将检测字符串之间的空格。 You can remove starting and ending whitespace by
您可以通过以下方式删除开始和结束空格
$scope.username1.trim();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.