RequiredRegexp does not work with a regular expression
that spans multiple lines. This limitation is not clear
from the documentation. Regular expressions have no
problem working over multiple lines, so why would
anyone expect RequiredRegexp to have this limit.
There is a patch available that implements a new check,
RequiredMultiLineRegexp, that works as you would
expect.I'd like to suggest the RequiredMultiLineRegexp
code replace the existing RequiredRegexp code, so we
have a RequiredRegexp check that works for one or more
If you make the above change I think you can also get
rid of RegexpHeader. It seems redundant when all that
is needed is to precede your regular expression with
^^, so it only matches at the beginning of the file.