错了, 这样 s:='abcdefg'; if s[2]='c' and s[5]='f' then showmessage('Found! Good luck!');
to wonderxin: 我说的是通用算法,'c??f'是举个例子。 function BlurPos(substr, srcstr: String): Integer; 其中substr要求是任意给定的模糊子串:'??ab','?a?b','????',......
VAR s1,s2:string; i:integer; begin s1:='abcdefg'; s2:='c??f'; for i:=1 to length(s1)-length(s2) do begin if (s1[i]=s2[1]) and (s1[i+4]=s2[4]) then showmessage('find it'); end; if
我的只是一个例子,不太完善,你自己在完善一下吧! 上网太费钱了...... 不好意思 你可以查找'?' if s2[i]='?' then Space:=Space+1; 什么的...
这样
s:='abcdefg';
if s[2]='c' and s[5]='f' then
showmessage('Found! Good luck!');
我说的是通用算法,'c??f'是举个例子。
function BlurPos(substr, srcstr: String): Integer;
其中substr要求是任意给定的模糊子串:'??ab','?a?b','????',......
s1,s2:string;
i:integer;
begin
s1:='abcdefg';
s2:='c??f';
for i:=1 to length(s1)-length(s2) do
begin
if (s1[i]=s2[1]) and (s1[i+4]=s2[4]) then
showmessage('find it');
end;
if
上网太费钱了......
不好意思
你可以查找'?'
if s2[i]='?' then Space:=Space+1;
什么的...