这似乎符合我定义的规则,但我今晚才开始学习正则表达式,所以我想知道它是否正确.
规则:
正则表达式模式:
/^[a-zA-Z0-9]+([a-zA-Z0-9](_|-| )[a-zA-Z0-9])*[a-zA-Z0-9]+$/
regex
如何编写正则表达式以匹配,
a string which does not contain the underscore "_".
regex regex-negation
regex ×2
regex-negation ×1