public void PerformSubstitution (TextReader reader, TextWriter writer) {
string line = reader.ReadLine ();
while (line != null) {
if (line.Length > 0 && _regex.IsMatch (line))
line = _regex.Replace (line, new MatchEvaluator (PerformSubstitutionReplace));
writer.WriteLine (line);
line = reader.ReadLine ();
}
}