title: Regex a string with variable whitespace and a newline
body: <p>I have the following string I am trying to search for:</p>
  
  <pre><code>&lt;td&gt;&lt;/td&gt;
  &lt;td&gt;)&lt;/td&gt;
  </code></pre>
  
  <p>There can be any number of spaces between the <code>&lt;/td&gt;</code> and <code>&lt;td&gt;</code> besides the newline. There will always be only one newline but an expression that simply ignores all whitespace (including newlines) is fine.</p>
  
  <p>I'm trying to figure out how to perform a string replacement using this information <em>without</em> collapsing all of the whitespace in the file. I found many solutions with an expression that handles whitespace but nothing that I have been able to make work with a newline as well.</p>
  
  <p>My regex experience is limited. How should I approach this problem from a bash shell environment?</p>