Re: [ansible-project] Request assistance to write script using Regex

2021-07-13 Thread Dick Visser
Well, it's says it right there: On Tue, 13 Jul 2021 at 19:27, Vikram S wrote: > Syntax Error while loading YAML. > found unknown escape character You escape something but incorrect. Try with 2 backslashes: msg: "{{ default_route.stdout[0] | regex_findall('\\* (.*)') }}" -- Dick

[ansible-project] Request assistance to write script using Regex

2021-07-13 Thread Vikram S
Hi Team, >From the below output, i need to extract only the IP 10.1.1.10 (it is ok if the entire line starting from asterix is extracted). I wrote below script and it seemed to work when i tested in regex101.com but failing when i used it in playbook. What am i doing wrong? How can it be impr

[ansible-project] Request assistance to write script using Regex

2021-07-13 Thread Vikram S
>From the below output, i need to extract only the IP 10.1.1.10 (it is ok if the entire line starting from asterix is extracted). I wrote below script and it seemed to work when i tested in regex101.com but failing when i used it in playbook. What am i doing wrong? How can it be improved? *SW