G
Guest
I have a string (resultHtml) which contains HTML screen scraped from a page in my application
I want to turn everything inside any html tags to lowercase.
I'm doing the following
string resultHtml = // Get the Htm
Regex regexLower = new Regex( @"<(.|\n)*?>",
RegexOptions.IgnoreCase|RegexOptions.Multiline|RegexOptions.IgnorePatternWhitespace|RegexOptions.Compiled)
MatchCollection colMatch = regexLower.Matches(resultHtml)
for (int i=0; i<colMatch.Count; i++
resultHtml.Replace(colMatch.ToString(), colMatch.ToString().ToLower())
This hardly seems efficient, is there a better way to do it
I want to turn everything inside any html tags to lowercase.
I'm doing the following
string resultHtml = // Get the Htm
Regex regexLower = new Regex( @"<(.|\n)*?>",
RegexOptions.IgnoreCase|RegexOptions.Multiline|RegexOptions.IgnorePatternWhitespace|RegexOptions.Compiled)
MatchCollection colMatch = regexLower.Matches(resultHtml)
for (int i=0; i<colMatch.Count; i++
resultHtml.Replace(colMatch.ToString(), colMatch.ToString().ToLower())
This hardly seems efficient, is there a better way to do it