Dim exStr : exStr = " <Head>data</Head> "
Dim res
res = Ucase(Replace(Mid(exStr, instr(exStr, ">")+1,4), "ata", "ark"))
'res now equals DARK
'instr(exStr, ">") returns 7
'Mid(" <Head>data</Head> ", 7+1, 4) returns "data"
'Replace("data", "ata", "ark") returns "dark"
'Ucase("dark") returns "DARK"