title: How to use PowerShell/RegEx to find all HTML files with empty <title> tag?
body: <p>I am using Powershell to search thousands of HTML files for files that contain empty <code>&lt;title&gt;</code> tags. These tags may appear in the files with no space, whitespace, or line breaks in between the opening/closing tags. For example, they may look like any of the following</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;title&gt;&lt;/title&gt;
  </code></pre>
  
  <pre class="lang-html prettyprint-override"><code>&lt;title&gt;  &lt;/title&gt;
  </code></pre>
  
  <pre class="lang-html prettyprint-override"><code>&lt;title&gt;
  &lt;/title&gt;
  </code></pre>
  
  <p>So far I have the following code</p>
  
  <pre class="lang-bsh prettyprint-override"><code>Get-ChildItem locationPath *.htm -Recurse |
      Select-String -pattern '&lt;title&gt;[\s]*&lt;/title&gt;' |
      group path |
      select name
  </code></pre>
  
  <p>This works to provide me a list of all the files that match the first two examples. However, I am struggling to find a way to match the third example in which it has a line break and an unknown amount of whitespace. Any help would be greatly appreciated.</p>