title: C# regex with line breaks
body: <p>Hello I have the following code</p>
  
  <pre><code>namespace ConsoleApplication2
  {
      class Program
      {
          static void Main(string[] args)
          {
  
              string searchText = "find this text, and some other text";
              string replaceText = "replace with this text";
  
  
              String query = "%SystemDrive%";
              string str = Environment.ExpandEnvironmentVariables(query);
              string filePath = (str + "mytestfile.xml"); 
  
              StreamReader reader = new StreamReader( filePath );
              string content = reader.ReadToEnd();
              reader.Close();
  
              content = Regex.Replace( content, searchText, replaceText );
  
              StreamWriter writer = new StreamWriter( filePath );
              writer.Write( content );
              writer.Close();
          }
      }
  }
  </code></pre>
  
  <p>the replace doesn't find the search text because it is on separate lines like </p>
  
  <blockquote>
    <p>find this text,<br>
    and some other text.</p>
  </blockquote>
  
  <p>How would I write the regex epression so that it will find the text.</p>