2014-04-01 61 views
-5

請參閱下面的示例,需要滿足正則表達式。

規則:4-12個字母數字字符或特殊字符(〜!@ $%& * _ +)至少有一個字母,無空格

test     ---------This is Valid 
[email protected]    ---------This is Valid 
test2     ---------This is Valid 
2222     ---------This is NOT Valid 
[email protected]     ---------This is NOT Valid 
@2222     ---------This is NOT Valid 
test user2   ---------This is NOT Valid 
testUser    ---------This is Valid 
[email protected]   ---------This is Valid 
testUser2    ---------This is Valid 
testUser.2   ---------This is NOT Valid 
+1

[你到目前爲止嘗試過什麼?](http://mattgemmell.com/what-have-you-tried) –

+0

這樣的工具可以幫助你隨時測試:http://regexpal.com/ – DrLivingston

回答

相關問題