Match multiple consecutive lines in lineinfile

Hi,

I need to add a specific line after some lines in a config file. Due to
the structure of the file, I have to match several consecutive lines to
ensure the line will go to the right place (and I know about template
and copy, but they won't fit my needs in this case).

My problem is that is seems the regexp argument in Ansible does not
match "\n", contrary to the line argument.

Is there a workaround?

Thanks!