我正在编写脚本以检查我的密码字符串中是否包含至少一个特殊字符.我用InnoSetup学习正则表达式是不可能的.
有人可以帮助我实现这个目标吗?
提前致谢,
节目播音员
[code]
function PasswordContainsAtLeastOneSpecialChar(Pass : String) : Boolean;
var
i : integer;
begin
Result := false;
for i:=1 to length(Pass) do
begin
case Pass[i] of
'!', '"', '§', '$', '%', '&', '/', '(', ')', '=', '?', '\', '*', '#': // list all special characters here
begin
Result := true;
Exit;
end;
end;
end;
end;
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1211 次 |
| 最近记录: |