濮阳杆衣贸易有限公司

主頁 > 知識庫 > Highlight patterns within strings

Highlight patterns within strings

熱門標簽:常用地圖標注范圍點 離線電子地圖標注軟件注冊 為什么外呼系統(tǒng)需要預存話費呢 外呼回撥系統(tǒng)圖片 咸陽銷售外呼系統(tǒng) 辦理400電話一年多少錢 寧夏怎么申請400電話 企數(shù)外呼系統(tǒng)能用多久 蘭州智能語音電銷機器人功能

復制代碼 代碼如下:

'Replaces pattern with highlighted replacement (using style) and preserves case  
Public Function highlight(strText, strFind)  
    Dim objRegExp, i, strHighlight  

    'Split the search terms into an array  
    Dim arrFind  
    arrFind = Split(strFind, " ")  

    'Initialize the regular expression object to perfom the search  
    Dim oMatches, sMatch  
    Set oregExp = New RegExp  

    oregExp.Global = True 'Returns all matches to the search term  
    oregExp.IgnoreCase = True 'Case insensitive  

    'Loop through the array of search terms to find matches  
    For i = 0 to UBound(arrFind)  
        oregExp.Pattern = arrFind(i) 'Sets the search pattern string  
        Set oMatches = oregExp.Execute(strText) '// performs the search   
        for each match in oMatches  
            'Build the code to be used to highlight results  
            strHighlight = "span class=""highlight"">"  match.value  "/span>"  
        next  
        'Replace matches from the search with the above code  
        strText = oregExp.Replace(strText, strHighlight)  
     Next  

    highlight = strText  

    Set objRegExp = Nothing  
End Function

標簽:昌都 泰州 咸陽 麗江 溫州 家電維修 鐵嶺 昆明

巨人網(wǎng)絡通訊聲明:本文標題《Highlight patterns within strings》,本文關鍵詞  Highlight,patterns,within,strings,;如發(fā)現(xiàn)本文內容存在版權問題,煩請?zhí)峁┫嚓P信息告之我們,我們將及時溝通與處理。本站內容系統(tǒng)采集于網(wǎng)絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《Highlight patterns within strings》相關的同類信息!
  • 本頁收集關于Highlight patterns within strings的相關信息資訊供網(wǎng)民參考!
  • 推薦文章
    株洲市| 盐边县| 许昌市| 德昌县| 柏乡县| 鄂托克旗| 丁青县| 茶陵县| 军事| 兰考县| 克什克腾旗| 墨玉县| 铁岭县| 淮南市| 和田县| 汉中市| 竹溪县| 紫云| 隆尧县| 张家港市| 大余县| 栾川县| 南安市| 勃利县| 新郑市| 宜春市| 屏南县| 罗山县| 余干县| 任丘市| 富源县| 民县| 湾仔区| 霞浦县| 马关县| 呼伦贝尔市| 合肥市| 宜兰市| 东台市| 曲阜市| 扎鲁特旗|