look at this code:
set regx = new RegExp
regx.IgnoreCase = True
regx.Global = True
regx.Pattern = Sch
set reMatches = regx.Execute(DtlRow)
if reMatches.Count>0 then
for each objMatch in reMatches
DtlRow=regx.Replace(DtlRow,"<b style='background- color:#AAAAFF;'>" & objMatch.Value & "</b>"
next
end if
so we are searching string DtlRow for occurrences of Sch
suppose DtlRow contains:
Practical and practical
and Sch is 'practical'
then the result is:
practical and practical
the regular expression finds both but the first gets changed to lowercase, like the second.
it seems the objMatch.Value stores the last value found.
?????
set regx = new RegExp
regx.IgnoreCase = True
regx.Global = True
regx.Pattern = Sch
set reMatches = regx.Execute(DtlRow)
if reMatches.Count>0 then
for each objMatch in reMatches
DtlRow=regx.Replace(DtlRow,"<b style='background- color:#AAAAFF;'>" & objMatch.Value & "</b>"
next
end if
so we are searching string DtlRow for occurrences of Sch
suppose DtlRow contains:
Practical and practical
and Sch is 'practical'
then the result is:
practical and practical
the regular expression finds both but the first gets changed to lowercase, like the second.
it seems the objMatch.Value stores the last value found.
?????