Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Some details:</p> <pre><code> search_kiemeles=replace(lcase(search),"""","") do while not rs.eof 'The search result loop hirdetes=rs("hirdetes") data=RegExpValueA("([A-Za-zöüóőúéáűíÖÜÓŐÚÉÁŰÍ0-9]+)",search_kiemeles) 'Give back all the search words in an array, I need non-english characters also For i=0 to Ubound(data,1) hirdetes = RegExpReplace(hirdetes,"("&amp;NoAccentRE(data(i))&amp;")","&lt;em&gt;$1&lt;/em&gt;") Next response.write hirdetes rs.movenext Loop ... </code></pre> <p>Functions</p> <pre><code>'All Match to Array Function RegExpValueA(patrn, strng) Dim regEx Set regEx = New RegExp ' Create a regular expression. regEx.IgnoreCase = True ' Set case insensitivity. regEx.Global = True Dim Match, Matches, RetStr Dim data() Dim count count = 0 Redim data(-1) 'VBSCript Ubound array bug workaround if isnull(strng) or strng="" then RegExpValueA = data exit function end if regEx.Pattern = patrn ' Set pattern. Set Matches = regEx.Execute(strng) ' Execute search. For Each Match in Matches ' Iterate Matches collection. count = count + 1 Redim Preserve data(count-1) data(count-1) = Match.Value Next set regEx = nothing RegExpValueA = data End Function 'Replace non-english chars Function NoAccentRE(accent_string) NoAccentRE=accent_string NoAccentRE=Replace(NoAccentRE,"a","§") NoAccentRE=Replace(NoAccentRE,"á","§") NoAccentRE=Replace(NoAccentRE,"§","[aá]") NoAccentRE=Replace(NoAccentRE,"e","§") NoAccentRE=Replace(NoAccentRE,"é","§") NoAccentRE=Replace(NoAccentRE,"§","[eé]") NoAccentRE=Replace(NoAccentRE,"i","§") NoAccentRE=Replace(NoAccentRE,"í","§") NoAccentRE=Replace(NoAccentRE,"§","[ií]") NoAccentRE=Replace(NoAccentRE,"o","§") NoAccentRE=Replace(NoAccentRE,"ó","§") NoAccentRE=Replace(NoAccentRE,"ö","§") NoAccentRE=Replace(NoAccentRE,"ő","§") NoAccentRE=Replace(NoAccentRE,"§","[oóöő]") NoAccentRE=Replace(NoAccentRE,"u","§") NoAccentRE=Replace(NoAccentRE,"ú","§") NoAccentRE=Replace(NoAccentRE,"ü","§") NoAccentRE=Replace(NoAccentRE,"ű","§") NoAccentRE=Replace(NoAccentRE,"§","[uúüű]") end function </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload