title: Clang-tidy header-filter regex: Makefile -> .clang-tidy
body: <p>I'm attempting to move the hardcoded config option of <code>clang-tidy</code> from our Makefile to a <code>.clang-tidy</code> YAML file. As of now, we call run-clang-tidy-6.0.py as such:</p>
  <pre><code># Run clang-tidy. The header filter includes files in the foo and bar/baz directories
  # but it excludes files ending in .g.h (auto-generated headers).
  run-clang-tidy-6.0.py -header-filter='.*(foo|bar\/baz).*(?&lt;!\.g\.h)$$' &gt; clang-tidy-output.txt
  </code></pre>
  <p>This works fine. But if I have <code>HeaderFilterRegex: '.*(foo|bar\/baz).*(?&lt;!\.g\.h)$$'</code> in <code>.clang-tidy</code>, the filtering doesn't work as expected.</p>
  <p>I attempted various things surrounding what characters were escaped / not escaped as I know Make and YAML have different expectations but I can't get it just right.
  i.e:</p>
  <ul>
  <li>Replace $$ -&gt; $</li>
  <li>Double escaping \ ( \ -&gt; \\)</li>
  <li>Removing ''
  Could someone explain to me the appropriate format of this regex in a YAML file?</li>
  </ul>