日期:2014-05-17  浏览次数:20889 次

对一个规则字符串进行替换操作
a2,b5,h2,k9,

替换成
plo*2|ver*5|thlik*2|poor*9

就是说a替换成plo*,以此类推

------解决方案--------------------
strA = "a2,b5,h2,k9 " '如果最后有一个“,”那么最好去掉。
arrA = split(strA, ", ")
for i = 0 to ubound(arrA)
if left(arrA(i),1)= "a " then
strTemp = strTemp & "plo* "&right(arrA(i),1)
if i <> ubound(arrA)
strTemp = strTemp & "| "
end if
elseif
'自己去写各种情况
end if
next
Response.write strTemp