Code: Select all
If g_Highlight And Not g_rehght
g_rehght = CreateRegularExpression(#PB_Any, "(.*?)(" + SearchAll$ + ")(.*?)", #PB_RegularExpression_AnyNewLine | #PB_RegularExpression_NoCase)
EndIf
; MenuItem(ListSize(LFiles()) - 1, ReplaceString(LFiles()\title, SearchAll$, "<font color=#89F>" + SearchAll$ + "</font>", #PB_String_NoCase))
name2$ = LFiles()\title
; !v_found = v_g_rehght.test(v_name2$)
; !v_name2$ = v_name2$.replace(v_g_rehght, "<font color=#89F>$1</font>");
; Debug g_rehght
; !v_name3$ = v_name2$.replace(v_g_rehght, "$1<font color=#89F>$2</font>$3");
; !v_name2$ = v_name2$.replace(/(v_searchall$)/i, "<font color=#89F>$1</font>");
; !v_name2$ = v_name2$.replace(/^(.*?)(v_searchall$)(.*?)$/im, "$1<font color=#89F>$2</font>$3");
re2$ = "/(" + SearchAll$ + ")/i"
!v_name3$ = v_name2$.replace(v_re2$, "<font color=#89F>$1</font>");
; Debug name2$
MenuItem(ListSize(LFiles()) - 1, name3$)
Code: Select all
name3$ = ReplaceRegularExpression(g_rehght, name2$, "$1<font color=#89F>$2</font>$3")