導航:首頁 > 凈水問答 > 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過濾重復數據相關的資料

熱點內容
樹脂砂造型烘乾 瀏覽:796
嘉保士空氣凈化器除甲醛怎麼樣 瀏覽:631
污水源熱泵污水的流向 瀏覽:435
醫院污水處理日常監測記錄本 瀏覽:709
史必思凈水器最好的多少線一個 瀏覽:499
如何處理廢水中的汞離子 瀏覽:220
污水處理系統加工工藝 瀏覽:292
農村生活廢水的處理 瀏覽:581
過濾水為什麼沒有水垢 瀏覽:842
鍋爐的水處理基本知識 瀏覽:842
反滲透裝置的清洗方式有幾種 瀏覽:642
中山滲透純水設備什麼價格 瀏覽:216
帶水鑽孔機污水怎麼清理 瀏覽:106
朗逸plus空調濾芯怎麼打開 瀏覽:374
工業廢水鉍排放標准 瀏覽:312
特力屋凈水器濾芯怎麼換 瀏覽:728
污水處理ph登記表 瀏覽:2
污水處理廠的基本程序 瀏覽:912
挖掘機大泵提升器圖片 瀏覽:942
空氣凈化器濾芯為什麼快失效 瀏覽:321