求教!!
验证Email
[email protected]"[^@^.]+@[[^@^.]+\\.]+(com|gov|net|com\\.cn|edu\\.cn)"
返回假"[^@^.]+@[[^@^.]+\\.]+[com|gov|net|com\\.cn|edu\\.cn]"
返回真那么()跟[]有什么区别
验证Email
[email protected]"[^@^.]+@[[^@^.]+\\.]+(com|gov|net|com\\.cn|edu\\.cn)"
返回假"[^@^.]+@[[^@^.]+\\.]+[com|gov|net|com\\.cn|edu\\.cn]"
返回真那么()跟[]有什么区别
()其实是group的概念, (字符串组A)(..B)
可以用来做分割用.
[]表示字符集