Regular expression and Linux command in Ansible

Hi All,

I am trying to run a playbook where when I entre standard ansible modules using regular expressions it works fine ( Thanks to Todd for helping me with it), however when I entre a Linux command in place of an ansible module it does not work as expected. An suggestion or guidance to make it would be of great help to resolve my issue.
The playbook is:- ( I have highlighted the command that I wish to execute )