導航:首頁 > 凈水問答 > asp過濾重復數據

asp過濾重復數據

發布時間:2024-10-28 05:21:28

❶ asp 正則 過濾重復字元串的代碼

<%
'過濾重復
Function norepeat(Str)
Dim RegEx
If IsNull(Str) Or Str="" Then Exit Function
Set RegEx=New RegExp
RegEx.Global = True
RegEx.IgnoreCase=True
RegEx.MultiLine = True
RegEx.pattern="(.)\1+"
str=regEx.replace(str,"$1")
Set RegEx=Nothing
Norepeat=str
End Function
'示例
s=""
response.write Norepeat(s)
%>

❷ ASP如何過濾數組內重復內容

dim a(4)
a(0)=1
a(1)=1
a(2)=2
a(3)=2
a(4)=3
for n=0 to ubound(a)-1
for s=1 to ubound(a)

if a(s)=a(n) then
a(n)=""

end if
next

next
a_new=filter(a,"")『把a數組裡面是空值的全部刪掉,然後重新組合成一個a_new數組。
for n=0 to ubound(a_new)』列印出a_new數組。
response.write a_new(n)&"<br>"

next

說明:a_new是新生成的數組,去掉了a數組裡面被清空的那些,重新生成了一個開頭角標是0的a_new數組。

❸ ASP如何去重復數據

最好在資料庫讀取的時候就用group by 合並一下,如果不能在資料庫操作只能用數組了!輸出時候遍歷檢索一下重復的不顯示了!

閱讀全文

與asp過濾重復數據相關的資料

熱點內容
我國電鍍廢水現狀數據 瀏覽:854
凈水機濾芯棉多少錢一個 瀏覽:651
ro膜用泵增壓原理圖 瀏覽:39
吉利機油濾芯怎麼更換 瀏覽:26
地暖水溫多少度產生水垢 瀏覽:233
餐飲廢水和生活污水區別 瀏覽:715
日本的核廢水排入大海我國的漁民怎麼辦 瀏覽:945
長春印染污水壓濾機哪裡買 瀏覽:256
五菱榮光v空氣濾芯怎麼使用 瀏覽:303
機油濾芯扳手打滑怎麼辦求回答 瀏覽:60
蘋果6用愛思刷回1033 瀏覽:527
強力除垢配方 瀏覽:326
格力反滲透凈水器換pp棉怎麼調 瀏覽:601
清理鋁壺里的水垢 瀏覽:405
壁掛爐過濾器在什麼地方 瀏覽:472
污水變可燃液體 瀏覽:243
凈水機怎麼放廢水 瀏覽:758
完美精什麼牌子的飲水機 瀏覽:32
哈弗空氣濾芯哪裡代工的 瀏覽:79
飲水機生產的是什麼水 瀏覽:300