On Mon, Sep 21, 2020 at 11:29 AM rajtheco...@gmail.com < rajthecomputer...@gmail.com> wrote:
> How to search multiple lines using regex in Ansible? > > I tried below pattern and it is not working > > regex: ^line con.*(?:\n^\s.*) > > line console 0 > password > I don't think you can use caret " ^ " in the middle of a regex. It is probably trying to match a literal ^ symbol and not finding it. Try removing the caret. -- Bob Harold -- You received this message because you are subscribed to the Google Groups "Ansible Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-devel/CA%2Bnkc8Au54t%3Dr7ZhD4tcO-aQyN4VXPvu2KVX7MkvQd3cAQ_MXA%40mail.gmail.com.