use the System.Text.RegularExpressions namespace.C#string newString = Regex.Replace(originalString,"regular expression here");
VB
Dim newString As String newString = Regex.Replace(originalString, "regular expression here")
As for caching pages...I am almost positive it caches to memory, so yeah, it would not be a good idea to cache many pages for long periods of time (beyond a couple of hours).