var rgex= /^[\\+\\w.-]/ ;
This works for ss1
, s
, s+ss
. But I want to make sure its giving false for +san
.
Choose the first character in a class that doesn't contain +
:
var rgex= /^[\w.-][+\w.-]*/ ;
May be you want to anchor the end of the string:
var rgex= /^[\w.-][+\w.-]*$/ ;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.