首先,我們先看幾個實際的例子:
1. 驗證輸入字符是否
javascript:
var ex = "^w+$";
var re = new RegExp(ex,"i");
return re.test(str);
VBScript
Dim regEx,flag,ex
ex = "^w+$"
Set regEx = New RegExp
regEx.IgnoreCase = True
regEx.Global = True