How to change this regexp to multiline?

21 views
Skip to first unread message

John Harmon

unread,
Sep 21, 2017, 3:51:31 PM9/21/17
to Ansible Project
I need to set the multiline flag on this, but don't know how to.  Can anyone help?

regexp: '^(?:passwd):\s+(?:(?!sss).)+$'


John Harmon

unread,
Sep 21, 2017, 4:01:09 PM9/21/17
to Ansible Project
Just a thought.... I am using this with the replace module.... does it already assume multiline (as lineinfile does not)?

Kai Stian Olstad

unread,
Sep 21, 2017, 4:08:12 PM9/21/17
to ansible...@googlegroups.com
On 21. sep. 2017 22:01, John Harmon wrote:
> Just a thought.... I am using this with the replace module.... does it
> already assume multiline (as lineinfile does not)?

Have you read the docs under regexp?
https://docs.ansible.com/ansible/latest/replace_module.html

--
Kai Stian Olstad

John Harmon

unread,
Sep 21, 2017, 4:10:50 PM9/21/17
to Ansible Project
I had seen the doc before, but I didn't notice the definition under the regexp before.  Thank you.


On Thursday, September 21, 2017 at 1:51:31 PM UTC-6, John Harmon wrote:
Reply all
Reply to author
Forward
0 new messages