- replace:
        path: my_file
        regexp: '(XXX1.*)$\s+'
        replace: '\1'



On Thu, 18 Oct 2018 at 09:47, Shlomit Afgin <[email protected]> wrote:
>
>
> HI,
> Is there any way to remove from a file,  all blank lines that exist after 
> line start with specific string?
>
> for example:
>
> Remove all blank lines after lines start with XXX1
>
>
> XXX1bla bla bla
>
> hjshfgdfg
> gdfsgdsgdf
> gsdfgd
>
> XXX1 blu bluu blu
>
> dfjgljfd
> gfdgds
>
>
> will be:
> XXX1bla bla bla
> hjshfgdfg
> gdfsgdsgdf
> gsdfgd
>
> XXX1 blu bluu blu
> dfjgljfd
> gfdgds
>
>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/ansible-project/a24ccd71-c5f7-4fc3-8d8e-c9ceda4d59b4%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAL8fbwMxtDFSjZ-qFkH4zabv_7Jr2mF-PwmSrETj1BddrmT53w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to